Skip to content

setConfig

setConfig(cfg): void

Defined in: packages/log/src/index.ts:46

Sets log configuration.

The configuration, optionally including a theme.

"text" | "json"

The configuration format.

number

How much space in the JSON output of objects. This does not change spacing in JSON logs, only for objects passed into log functions.

{ _construct?: (callback) => void; _destroy?: { }; _final?: { }; _write?: { }; _writev?: (chunks, callback) => void; [captureRejectionSymbol]?: <K>(error, event, …args) => void; addListener?: { }; closed?: boolean; compose?: { }; cork?: () => void; destroy?: { }; destroyed?: boolean; emit?: { }; end?: { }; errored?: Error | null; eventNames?: () => (string | symbol)[]; getMaxListeners?: () => number; listenerCount?: { }; listeners?: { }; off?: { }; on?: { }; once?: { }; pipe?: { }; prependListener?: { }; prependOnceListener?: { }; rawListeners?: { }; removeAllListeners?: { }; removeListener?: { }; setDefaultEncoding?: { }; setMaxListeners?: { }; uncork?: () => void; writable?: boolean; writableAborted?: boolean; writableCorked?: number; writableEnded?: boolean; writableFinished?: boolean; writableHighWaterMark?: number; writableLength?: number; writableNeedDrain?: boolean; writableObjectMode?: boolean; write?: { }; }

Standard error output.

(callback) => void

{ }

{ }

{ }

(chunks, callback) => void

<K>(error, event, …args) => void

{ }

boolean

Is true after 'close' has been emitted.

Since

v18.0.0

{ }

() => void

{ }

boolean

Is true after writable.destroy() has been called.

Since

v8.0.0

{ }

{ }

Error | null

Returns error if the stream has been destroyed with an error.

Since

v18.0.0

() => (string | symbol)[]

() => number

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

() => void

boolean

Is true if it is safe to call writable.write(), which means the stream has not been destroyed, errored, or ended.

Since

v11.4.0

boolean

Returns whether the stream was destroyed or errored before emitting 'finish'.

Since

v18.0.0, v16.17.0

number

Number of times writable.uncork() needs to be called in order to fully uncork the stream.

Since

v13.2.0, v12.16.0

boolean

Is true after writable.end() has been called. This property does not indicate whether the data has been flushed, for this use writable.writableFinished instead.

Since

v12.9.0

boolean

Is set to true immediately before the 'finish' event is emitted.

Since

v12.6.0

number

Return the value of highWaterMark passed when creating this Writable.

Since

v9.3.0

number

This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the highWaterMark.

Since

v9.4.0

boolean

Is true if the stream’s buffer has been full and stream will emit 'drain'.

Since

v15.2.0, v14.17.0

boolean

Getter for the property objectMode of a given Writable stream.

Since

v12.3.0

{ }

{ _construct?: (callback) => void; _destroy?: { }; _final?: { }; _write?: { }; _writev?: (chunks, callback) => void; [captureRejectionSymbol]?: <K>(error, event, …args) => void; addListener?: { }; closed?: boolean; compose?: { }; cork?: () => void; destroy?: { }; destroyed?: boolean; emit?: { }; end?: { }; errored?: Error | null; eventNames?: () => (string | symbol)[]; getMaxListeners?: () => number; listenerCount?: { }; listeners?: { }; off?: { }; on?: { }; once?: { }; pipe?: { }; prependListener?: { }; prependOnceListener?: { }; rawListeners?: { }; removeAllListeners?: { }; removeListener?: { }; setDefaultEncoding?: { }; setMaxListeners?: { }; uncork?: () => void; writable?: boolean; writableAborted?: boolean; writableCorked?: number; writableEnded?: boolean; writableFinished?: boolean; writableHighWaterMark?: number; writableLength?: number; writableNeedDrain?: boolean; writableObjectMode?: boolean; write?: { }; }

Standard output.

(callback) => void

{ }

{ }

{ }

(chunks, callback) => void

<K>(error, event, …args) => void

{ }

boolean

Is true after 'close' has been emitted.

Since

v18.0.0

{ }

() => void

{ }

boolean

Is true after writable.destroy() has been called.

Since

v8.0.0

{ }

{ }

Error | null

Returns error if the stream has been destroyed with an error.

Since

v18.0.0

() => (string | symbol)[]

() => number

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

{ }

() => void

boolean

Is true if it is safe to call writable.write(), which means the stream has not been destroyed, errored, or ended.

Since

v11.4.0

boolean

Returns whether the stream was destroyed or errored before emitting 'finish'.

Since

v18.0.0, v16.17.0

number

Number of times writable.uncork() needs to be called in order to fully uncork the stream.

Since

v13.2.0, v12.16.0

boolean

Is true after writable.end() has been called. This property does not indicate whether the data has been flushed, for this use writable.writableFinished instead.

Since

v12.9.0

boolean

Is set to true immediately before the 'finish' event is emitted.

Since

v12.6.0

number

Return the value of highWaterMark passed when creating this Writable.

Since

v9.3.0

number

This property contains the number of bytes (or objects) in the queue ready to be written. The value provides introspection data regarding the status of the highWaterMark.

Since

v9.4.0

boolean

Is true if the stream’s buffer has been full and stream will emit 'drain'.

Since

v15.2.0, v14.17.0

boolean

Getter for the property objectMode of a given Writable stream.

Since

v12.3.0

{ }

void