Skip to content 

MultiSinkLogger Class

Packages > @fluidframework/telemetry-utils > MultiSinkLogger

Multi-sink logger Takes multiple ITelemetryBaseLogger objects (sinks) and logs all events into each sink Implements ITelemetryBaseLogger (through static create() method)

Signature:

export declare class MultiSinkLogger extends TelemetryLogger 

Extends: TelemetryLogger

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(namespace, properties, propertyGetters) Create multiple sink logger (i.e. logger that sends events to multiple sinks)

Properties

List of properties for this class
Property Modifiers Type Description
loggers ITelemetryBaseLogger[]

Methods

List of methods on this class
Method Modifiers Description
addLogger(logger) Add logger to send all events to
send(event) Send an event to the loggers

Constructors

MultiSinkLogger.(constructor)

Create multiple sink logger (i.e. logger that sends events to multiple sinks)

Signature:

constructor(namespace?: string, properties?: ITelemetryProperties, propertyGetters?: ITelemetryPropertyGetters);

Parameters

List of 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

Properties

loggers

Signature:

protected loggers: ITelemetryBaseLogger[];

Methods

addLogger

Add logger to send all events to

Signature:

addLogger(logger?: ITelemetryBaseLogger): void;

Parameters

List of parameters
Parameter Type Description
logger ITelemetryBaseLogger Logger to add

Returns:

void

send

Send an event to the loggers

Signature:

send(event: ITelemetryBaseEvent): void;

Parameters

List of parameters
Parameter Type Description
event ITelemetryBaseEvent the event to send to all the registered logger

Returns:

void