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
Constructor | Modifiers | Description |
---|---|---|
(constructor)(namespace, properties, propertyGetters) | Create multiple sink logger (i.e. logger that sends events to multiple sinks) |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
loggers | ITelemetryBaseLogger[] |
Methods
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
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
Parameter | Type | Description |
---|---|---|
logger | ITelemetryBaseLogger | Logger to add |
Returns:
void
send
Send an event to the loggers
Signature:
send(event: ITelemetryBaseEvent): void;
Parameters
Parameter | Type | Description |
---|---|---|
event | ITelemetryBaseEvent | the event to send to all the registered logger |
Returns:
void