Skip to content
Classloggerv0.6.0

Logger

Channel-aware logging service.

Builds a plain LogRecord per call and dispatches it to the process-global LoggerChannelRegistry. No transport is bound, so it runs on a gateway server and a Cloudflare Worker without changes.

class Logger implements ILogger

Member visibility

Filter class members by access level.

constructor

Constructs a new instance of the Logger class

Logger(label: string, options?: LoggerOptions)
Parameter: label

Prefix on every entry from this logger.

Showing members with Protected visibility and higher.

configure()

Full-replaces the global logger configuration.

public static configure(config: LoggerConfig): void

setChannel()

Switches this logger to a different channel.

public setChannel(channel: LoggerChannelId): void

withChannel()

Returns a new logger for this label on the given channel.

public withChannel(channel: LoggerChannelId): Logger

withLabel()

Returns a new logger on this channel with the given label.

public withLabel(label: string): Logger