Skip to main content
zerotal

Documentation


Documentation / zerotal / logger / LogEntry

Interface: LogEntry

Defined in: packages/core/src/logger/types.ts:37

A single fully-enriched log record as it is handed to a LogChannel.

The LogManager populates timestamp, hostname, and pid on every entry; app, env, requestId, context, error, and stack appear only when the corresponding data is available.

Properties

level

level: LogLevel

Defined in: packages/core/src/logger/types.ts:39

Severity the entry was emitted at.


channel

channel: string

Defined in: packages/core/src/logger/types.ts:41

Name of the channel the entry was routed to.


scope?

optional scope?: string

Defined in: packages/core/src/logger/types.ts:47

Subsystem that emitted the entry — app, flow, inertia, queue. Rendered as a [SCOPE] tag by the console channel and kept as a field by the file/JSON ones, so a log file can be filtered by source.


message

message: string

Defined in: packages/core/src/logger/types.ts:49

Human-readable log message.


timestamp

timestamp: string

Defined in: packages/core/src/logger/types.ts:51

ISO-8601 timestamp of when the entry was created.


app?

optional app?: string

Defined in: packages/core/src/logger/types.ts:53

Application name, from app.name config, when configured.


env?

optional env?: string

Defined in: packages/core/src/logger/types.ts:55

Application environment, from app.env config, when configured.


hostname

hostname: string

Defined in: packages/core/src/logger/types.ts:57

Host machine name (os.hostname()).


pid

pid: number

Defined in: packages/core/src/logger/types.ts:59

Process id of the emitting process.


requestId?

optional requestId?: string

Defined in: packages/core/src/logger/types.ts:61

Id of the active HTTP request, when logging inside a request context.


context?

optional context?: Record<string, unknown>

Defined in: packages/core/src/logger/types.ts:63

Arbitrary structured context passed at the call site (omitted when empty).


display?

optional display?: "table"

Defined in: packages/core/src/logger/types.ts:70

How a human-facing channel should present LogEntry.context. "table" asks the console for box-drawn columns; file and JSON channels ignore it and keep writing the same structured data. Purely a rendering hint — never a change to what the entry contains.


error?

optional error?: string

Defined in: packages/core/src/logger/types.ts:72

Error message, when an error/value was passed to the log call.


stack?

optional stack?: string

Defined in: packages/core/src/logger/types.ts:74

Stack trace, when the passed value was an Error with a stack.