Back to Pocketbase

Interface Record

static/jsvm/interfaces/slog.Record.html

latest2.7 KB
Original Source

Interface Record

A Record holds information about a log event. Copies of a Record share state. Do not modify a Record after handing out a copy to it. Call [NewRecord] to create a new Record. Use [Record.Clone] to create a copy with no shared state.

Hierarchy

  • Record

Index

Methods

addaddAttrsattrsclonenumAttrs

Properties

levelmessagepctime

Methods

add

  • add(...args): void

Add converts the args to Attrs as described in [Logger.Log], then appends the Attrs to the [Record]'s list of Attrs. It omits empty groups.

Parameters

Rest ...args: any[]

Returns void

addAttrs

  • addAttrs(...attrs): void

AddAttrs appends the given Attrs to the [Record]'s list of Attrs. It omits empty groups.

Parameters

Rest ...attrs: Attr[]

Returns void

attrs

  • attrs(f): void

Attrs calls f on each Attr in the [Record]. Iteration stops if f returns false.

Parameters

f: ((_arg0) => boolean)
- 
  - (\_arg0): boolean
  - 

Parameters

    - 
_arg0: Attr

Returns boolean

Returns void

clone

Clone returns a copy of the record with no shared state. The original record and the clone can both be modified without interfering with each other.

Returns slog.Record

numAttrs

  • numAttrs(): number

NumAttrs returns the number of attributes in the [Record].

Returns number

Properties

level

level: Level

The level of the event.

message

message: string

The log message.

pc

pc: number

The program counter at the time the record was constructed, as determined by runtime.Callers. If zero, no program counter is available.

The only valid use for this value is as an argument to [runtime.CallersFrames]. In particular, it must not be passed to [runtime.FuncForPC].

time

time: Time

The time at which the output method (Log, Info, etc.) was called.

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

On This Page

Generated using TypeDoc