Skip to content

@graphty/graphty-element / logging / LogRecord

Interface: LogRecord ​

Defined in: graphty-element/src/logging/types.ts:22

One thing that happened, as every destination receives it.

The same object is handed to every destination in turn, so it is frozen before the first one sees it, and so is data. A destination that needs to change a record copies it; one that changed it in place would change what every destination after it sees, and the destination it broke would be somebody else's.

Properties ​

category ​

readonly category: readonly string[]

Defined in: graphty-element/src/logging/types.ts:28

Who said it, as a hierarchical path, e.g. ["graphty", "layout", "ngraph"].


data? ​

readonly optional data?: Readonly<Record<string, unknown>>

Defined in: graphty-element/src/logging/types.ts:32

The facts attached to it, with every lazy value already computed.


error? ​

readonly optional error?: Error

Defined in: graphty-element/src/logging/types.ts:34

The failure itself, on an error record: the Error object, not a stack string.


level ​

readonly level: LogLevel

Defined in: graphty-element/src/logging/types.ts:26

How severe it is. TRACE arrives as TRACE, not collapsed onto DEBUG.


message ​

readonly message: string

Defined in: graphty-element/src/logging/types.ts:30

What they said, unformatted. formatLogRecord is the element's own rendering of it.


timestamp ​

readonly timestamp: Date

Defined in: graphty-element/src/logging/types.ts:24

When the entry was made.