Skip to content

@gvray/logger


@gvray/logger / LogContext

Interface: LogContext ​

Defined in: types.ts:66

The log context passed through the middleware pipeline and to listeners.

Middleware may mutate args (and other fields) before calling next(); listeners receive the context after all middleware has run, with formattedMessage populated.

Properties ​

args ​

args: unknown[]

Defined in: types.ts:76

Original arguments passed to the log method.


formattedMessage? ​

optional formattedMessage?: string

Defined in: types.ts:78

Fully formatted message string, populated before listeners fire.


level ​

level: LogLevel

Defined in: types.ts:68

Severity level of the log entry.


levelName ​

levelName: string

Defined in: types.ts:70

Human-readable level name, e.g. INFO, WARNING.


namespace? ​

optional namespace?: string

Defined in: types.ts:72

Namespace of the emitting logger, if one was set.


timestamp ​

timestamp: Date

Defined in: types.ts:74

When the log call was made.

Released under the MIT License.