A LoggerConfig defines various configurable aspects of a Logger's behavior.

This feature is in development as per the OpenTelemetry specification.

interface LoggerConfig {
    disabled?: boolean;
    minimumSeverity?: SeverityNumber;
    traceBased?: boolean;
}

Properties

disabled?: boolean

A boolean indication of whether the logger is enabled. If a Logger is disabled, it behaves equivalently to a No-op Logger. Defaults to false (loggers are enabled by default).

This feature is in development as per the OpenTelemetry specification.

minimumSeverity?: SeverityNumber

A SeverityNumber indicating the minimum severity level for log records to be processed. If not explicitly set, defaults to 0 (UNSPECIFIED). Log records with a specified severity (i.e. not 0) that is less than this value will be dropped. Log records with unspecified severity (0) bypass this filter.

This feature is in development as per the OpenTelemetry specification.

traceBased?: boolean

A boolean indication of whether the logger should only process log records associated with sampled traces. If not explicitly set, defaults to false. If true, log records associated with unsampled traces will be dropped.

This feature is in development as per the OpenTelemetry specification.