콘텐츠로 이동
한국어

NoopLogger

이 콘텐츠는 아직 번역되지 않았습니다.

Defined in: src/Logger.ts:120

A logger that discards every call. Handy for tests and benchmarks.

The parameters are spelled out and then discarded. Leaving them off still satisfies implements Logger — a function that ignores its arguments is assignable to one that takes them — but this class is exported, and a caller holding the concrete type rather than the interface got Expected 0 arguments, but got 1 on the ordinary log.info('hello') (#540).

new NoopLogger(): NoopLogger

NoopLogger

readonly level: Off = LogLevel.Off

Defined in: src/Logger.ts:121

Logger.level

debug(_message, …_args): void

Defined in: src/Logger.ts:122

string

…unknown[]

void

Logger.debug


error(_message, …_args): void

Defined in: src/Logger.ts:125

string

…unknown[]

void

Logger.error


info(_message, …_args): void

Defined in: src/Logger.ts:123

string

…unknown[]

void

Logger.info


warn(_message, …_args): void

Defined in: src/Logger.ts:124

string

…unknown[]

void

Logger.warn


withFields(_fields): Logger

Defined in: src/Logger.ts:127

Create a logger with extra static fields baked in. Unlike LogContext (which is dynamic / per-async-stack), withFields stamps the same fields on every record this logger emits — handy for component-level tagging like { component: 'shard-coordinator' } or { shardId: 12 } on a per-entity logger.

LogContextData

Logger

Logger.withFields


withSource(_source): Logger

Defined in: src/Logger.ts:126

Create a logger bound to a source (e.g. an actor path).

string

Logger

Logger.withSource