DebugLogger Class
Packages > @fluidframework/telemetry-utils > DebugLogger
Implementation of debug logger
Signature:
export declare class DebugLogger extends TelemetryLogger
Extends: TelemetryLogger
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(debug, debugErr, properties, propertyGetters) | Constructs a new instance of the DebugLogger class |
Methods
Method | Modifiers | Description |
---|---|---|
create(namespace, properties, propertyGetters) | static |
Create debug logger - all events are output to debug npm library |
mixinDebugLogger(namespace, baseLogger, properties, propertyGetters) | static |
Mix in debug logger with another logger. Returned logger will output events to both newly created debug logger, as well as base logger |
send(event) | Send an event to debug loggers |
Constructors
DebugLogger.(constructor)
Constructs a new instance of the DebugLogger
class
Signature:
constructor(debug: IDebugger, debugErr: IDebugger, properties?: ITelemetryProperties, propertyGetters?: ITelemetryPropertyGetters);
Parameters
Parameter | Type | Description |
---|---|---|
debug | IDebugger | |
debugErr | IDebugger | |
properties | ITelemetryProperties | |
propertyGetters | ITelemetryPropertyGetters |
Methods
create
Create debug logger - all events are output to debug npm library
Signature:
static create(namespace: string, properties?: ITelemetryProperties, propertyGetters?: ITelemetryPropertyGetters): TelemetryLogger;
Parameters
Parameter | Type | Description |
---|---|---|
namespace | string | Telemetry event name prefix to add to all events |
properties | ITelemetryProperties | Base properties to add to all events |
propertyGetters | ITelemetryPropertyGetters | Getters to add additional properties to all events |
Returns:
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?: ITelemetryProperties, propertyGetters?: ITelemetryPropertyGetters): TelemetryLogger;
Parameters
Parameter | Type | Description |
---|---|---|
namespace | string | Telemetry event name prefix to add to all events |
baseLogger | ITelemetryBaseLogger | Base logger to output events (in addition to debug logger being created). Can be undefined. |
properties | ITelemetryProperties | Base properties to add to all events |
propertyGetters | ITelemetryPropertyGetters | Getters to add additional properties to all events |
Returns:
send
Send an event to debug loggers
Signature:
send(event: ITelemetryBaseEvent): void;
Parameters
Parameter | Type | Description |
---|---|---|
event | ITelemetryBaseEvent | the event to send |
Returns:
void