Skip to main content

LogPayload

interface LogPayload 

Represents an individual log entry.

When displayed in the editor, the log entry will have the following format:

                             inspect node ┐
┌ expand more duration ┐ │
▼ ▼ ▼
┌────────────────────────────────────────────┐
│ ▶ message 300 ms (+) │
├────────────────────────────────────────────┤
│ remarks │
│ object │
│ stacktrace │
└────────────────────────────────────────────┘

Properties

durationMs

durationMs?: number

An optional duration in milliseconds.

Can be used to display any duration related to the log. The value is always visible next to the message.


inspect

inspect?: string

An optional key used to inspect a related object.

This will be used together with the Inspectable interface to display additional information about the inspected object. When specified, the log will have an "inspect" button that will open the "Properties" tab and select the inspected object.


level

The log level.


message

message: string

The main message of the log.

Always visible.


object

object?: any

An object that will be serialized as JSON and displayed under the message.

Visible only when the log is expanded.


remarks

remarks?: string

Additional information about the log.

Visible only when the log is expanded.


stack

stack?: string

The stack trace of the log.

Visible only when the log is expanded. The current stack trace can be obtained using new Error().stack. Both Chromium and Firefox stack traces are supported.