Skip to main content
Version: v1

DebugLogger Class

Implementation of debug logger

Signature

export declare class DebugLogger extends TelemetryLogger

Extends: TelemetryLogger

Constructors

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

Static Methods

MethodReturn TypeDescription
create(namespace, properties)TelemetryLoggerCreate debug logger - all events are output to debug npm library
mixinDebugLogger(namespace, baseLogger, properties)TelemetryLoggerMix in debug logger with another logger. Returned logger will output events to both newly created debug logger, as well as base logger

Methods

MethodReturn TypeDescription
send(event)voidSend 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

ParameterModifiersTypeDescription
debugIDebugger
debugErrIDebugger
propertiesoptionalITelemetryLoggerPropertyBags

Method Details

create

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

Signature

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

Parameters

ParameterModifiersTypeDescription
namespacestringTelemetry event name prefix to add to all events
propertiesoptionalITelemetryLoggerPropertyBagsBase 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

ParameterModifiersTypeDescription
namespacestringTelemetry event name prefix to add to all events
baseLoggeroptionalITelemetryBaseLoggerBase logger to output events (in addition to debug logger being created). Can be undefined.
propertiesoptionalITelemetryLoggerPropertyBagsBase properties to add to all events

Returns

Return type: TelemetryLogger

send

Send an event to debug loggers

Signature

send(event: ITelemetryBaseEvent): void;

Parameters

ParameterTypeDescription
eventITelemetryBaseEventthe event to send