Skip to main content
Version: v1

DebugLogger Class

Implementation of debug logger

Signature

export declare class DebugLogger extends TelemetryLogger

Extends: TelemetryLogger

Constructors

Constructor Description
(constructor)(debug, debugErr, properties) Constructs a new instance of the DebugLogger class

Static Methods

Method Return Type Description
create(namespace, properties) TelemetryLogger Create debug logger - all events are output to debug npm library
mixinDebugLogger(namespace, baseLogger, properties) TelemetryLogger Mix in debug logger with another logger. Returned logger will output events to both newly created debug logger, as well as base logger

Methods

Method Return Type Description
send(event) void Send an event to debug loggers

Constructor Details

(constructor)

Constructs a new instance of the DebugLogger class

Signature

constructor(debug: IDebugger, debugErr: IDebugger, properties?: ITelemetryLoggerPropertyBags);

Parameters

Parameter Modifiers Type Description
debug IDebugger
debugErr IDebugger
properties optional ITelemetryLoggerPropertyBags

Method Details

create

Create debug logger - all events are output to debug npm library

Signature

static create(namespace: string, properties?: ITelemetryLoggerPropertyBags): TelemetryLogger;

Parameters

Parameter Modifiers Type Description
namespace string Telemetry event name prefix to add to all events
properties optional ITelemetryLoggerPropertyBags Base properties to add to all events

Returns

Return type: TelemetryLogger

mixinDebugLogger

Mix in debug logger with another logger. Returned logger will output events to both newly created debug logger, as well as base logger

Signature

static mixinDebugLogger(namespace: string, baseLogger?: ITelemetryBaseLogger, properties?: ITelemetryLoggerPropertyBags): TelemetryLogger;

Parameters

Parameter Modifiers Type Description
namespace string Telemetry event name prefix to add to all events
baseLogger optional ITelemetryBaseLogger Base logger to output events (in addition to debug logger being created). Can be undefined.
properties optional ITelemetryLoggerPropertyBags Base properties to add to all events

Returns

Return type: TelemetryLogger

send

Send an event to debug loggers

Signature

send(event: ITelemetryBaseEvent): void;

Parameters

Parameter Type Description
event ITelemetryBaseEvent the event to send