Defines the configuration options for the console debug provider.

Example

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

// Set the config to enable debug messages to be displayed
// to the console
let dbgConfig = {
lvl: DblLevel.Debug
};

let provider = createMemoryProvider(dbgConfig);
$Dbg.addProvider(provider);

Hierarchy

  • IDbgProvider
    • IDbgMemoryProvider

Properties

_dbgCbAdd?: ((dbg) => void)

Type declaration

    • (dbg): void
    • Optional function called when the provider is added to an IDbg instance

      Parameters

      • dbg: IDbg

        The dbg instance

      Returns void

_dbgCbRm?: ((dbg) => void)

Type declaration

    • (dbg): void
    • Optional function called when the provider is removed from a IDbg instance

      Parameters

      • dbg: IDbg

        The dbg instance

      Returns void

chkLvl?: ((theLevel) => boolean)

Type declaration

    • (theLevel): boolean
    • Checks and returns whether any logging will be performed at the specified level by this provider instance.

      Parameters

      • theLevel: number

        The level to check

      Returns boolean

      true if at least one log entry would be recorded otherwise false

getLogs: (() => IDbgMemoryLog[])

Type declaration

log: ((ctx, message, data?) => void)

Type declaration

    • (ctx, message, data?): void
    • Log a message at the provided Debug Level to the debug provider with an optional data details to be associated with the message.

      Parameters

      • ctx: IDbgLogCtx

        The context for the log message

      • message: string

        The message to display to the log

      • Optional data: any

        An optional data element to be associated with the message.

      Returns void

Generated using TypeDoc