Readonly
nameSet the enabled state of this instance, regarding whether or not it will emit any log events. When true, emits events as normal; when false, suppresses all events.
The main benefit of this is to temorarily suppress all events on this instance, while keeping the currently set filter in-tact.
e.g. If this instance has a custom filter set, and then is disabled, when this is re-enabled later it will continue using the custom filter.
Customize which log events should be ignored by this instance. If the given predicate returns truthy, the event will be passed along to any registered listeners or transports; otherwise it will be suppressed.
Pass null
to reset the filter.
Generated using TypeDoc
Stand-in for
console
object usage.Instead of calling console.log() / console.warn() / etc. and losing the information immediately to the javascript runtime, this will pack the information in the call into a
LogEvent
, which can then have zero or more post-processing routines run on it, and be emitted to zero or more event observers in the parentLoggerTransport
.In general, there should be at least one new
Logger
instance per file and / or scope in your project.