DebugLogger
Defined in: src/logger.ts:235
A Logger instance, suitable for use in ICreateClientOpts.logger, which will write to the debug library.
Example
Section titled “Example” import debug from "debug";
const client = createClient({ baseUrl: hubUrl, userId: userId, accessToken: "akjgkrgjs", deviceId: "xzcvb", logger: new DebugLogger(debug(`digital-world-messaging-sdk:${userId}`)), });Implements
Section titled “Implements”Logger
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DebugLogger(
debugInstance):DebugLogger
Defined in: src/logger.ts:236
Parameters
Section titled “Parameters”debugInstance
Section titled “debugInstance”Debugger
Returns
Section titled “Returns”DebugLogger
Methods
Section titled “Methods”debug()
Section titled “debug()”debug(…
msg):void
Defined in: src/logger.ts:242
Output debug message to the logger.
Parameters
Section titled “Parameters”…any[]
Data to log.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Logger.debug
error()
Section titled “error()”error(…
msg):void
Defined in: src/logger.ts:254
Output error message to the logger.
Parameters
Section titled “Parameters”…any[]
Data to log.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Logger.error
getChild()
Section titled “getChild()”getChild(
namespace):DebugLogger
Defined in: src/logger.ts:258
Create a child logger.
This child will use the methodFactory of the parent, so any log extensions applied to the parent
at the time of calling getChild will be applied to the child as well.
It will NOT apply changes to the parent’s methodFactory after the child was created.
Those changes need to be applied to the child manually.
Parameters
Section titled “Parameters”namespace
Section titled “namespace”string
name to add to the current logger to generate the child. Some implementations of Logger
use this as a prefix; others use a different mechanism.
Returns
Section titled “Returns”DebugLogger
Implementation of
Section titled “Implementation of”Logger.getChild
info()
Section titled “info()”info(…
msg):void
Defined in: src/logger.ts:246
Output info message to the logger.
Parameters
Section titled “Parameters”…any[]
Data to log.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Logger.info
trace()
Section titled “trace()”trace(…
msg):void
Defined in: src/logger.ts:238
Output trace message to the logger, with stack trace.
Parameters
Section titled “Parameters”…any[]
Data to log.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Logger.trace
warn()
Section titled “warn()”warn(…
msg):void
Defined in: src/logger.ts:250
Output warn message to the logger.
Parameters
Section titled “Parameters”…any[]
Data to log.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Logger.warn