Skip to main content

Class: Logger

@kosko/log.Logger

Constructors

constructor

new Logger(options)

Parameters

NameType
optionsRequired<LoggerOptions>

Defined in

packages/log/src/Logger.ts:13

Methods

enabled

enabled(level): boolean

Parameters

NameType
levelLogLevel

Returns

boolean

Defined in

packages/log/src/Logger.ts:44


getLevel

getLevel(): LogLevel

Returns

LogLevel

Defined in

packages/log/src/Logger.ts:36


getWriter

getWriter(): LogWriter

Returns

LogWriter

Defined in

packages/log/src/Logger.ts:48


log

log(level, message, options?): void

Parameters

NameType
levelLogLevel
messagestring
optionsPartial<Omit<Log, "level" | "message" | "loggerLevel">>

Returns

void

Defined in

packages/log/src/Logger.ts:18


setLevel

setLevel(level): void

Parameters

NameType
levelLogLevel

Returns

void

Defined in

packages/log/src/Logger.ts:40


setWriter

setWriter(writer): void

Parameters

NameType
writerLogWriter

Returns

void

Defined in

packages/log/src/Logger.ts:52