NoopLogger
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
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).
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new NoopLogger():
NoopLogger
Returns
Section titled “Returns”NoopLogger
Properties
Section titled “Properties”
readonlylevel:Off=LogLevel.Off
Defined in: src/Logger.ts:121
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”debug()
Section titled “debug()”debug(
_message, …_args):void
Defined in: src/Logger.ts:122
Parameters
Section titled “Parameters”_message
Section titled “_message”string
…unknown[]
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”error()
Section titled “error()”error(
_message, …_args):void
Defined in: src/Logger.ts:125
Parameters
Section titled “Parameters”_message
Section titled “_message”string
…unknown[]
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”info()
Section titled “info()”info(
_message, …_args):void
Defined in: src/Logger.ts:123
Parameters
Section titled “Parameters”_message
Section titled “_message”string
…unknown[]
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”warn()
Section titled “warn()”warn(
_message, …_args):void
Defined in: src/Logger.ts:124
Parameters
Section titled “Parameters”_message
Section titled “_message”string
…unknown[]
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”withFields()
Section titled “withFields()”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.
Parameters
Section titled “Parameters”_fields
Section titled “_fields”Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”withSource()
Section titled “withSource()”withSource(
_source):Logger
Defined in: src/Logger.ts:126
Create a logger bound to a source (e.g. an actor path).
Parameters
Section titled “Parameters”_source
Section titled “_source”string
