• Create and return a IDbgProvider which will log the messages to the system runtimes console if available.

    Example

    import { $Dbg } from "@nevware21/ts-debug";
    import { createConsoleProvider } from "@nevware21/ts-debug-provider";

    // Add the console provider to the default $Dbg instance, this will
    // use the default debug level of error. So on Error, Critical and Terminal
    // log message all other messages Trace, Debug, Information and Warning will
    // be not displayed.
    $Dbg.addProvider(createConsoleProvider());

    $dbgError("Error Message"); // "Error Message" as an error on the console

    Parameters

    • Optional config: IDbgProviderConfig

      The configuration to apply for the console provider, when not specified or the lvl is not defined the default will be Error.

    Returns IDbgProvider

    A new IDbgProvider instance

Generated using TypeDoc