static/jsvm/interfaces/slog.Record.html
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.
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.
Rest ...args: any[]AddAttrs appends the given Attrs to the [Record]'s list of Attrs. It omits empty groups.
Rest ...attrs: Attr[]Attrs calls f on each Attr in the [Record]. Iteration stops if f returns false.
-
- (\_arg0): boolean
-
-
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.
NumAttrs returns the number of attributes in the [Record].
level: Level
The level of the event.
message: string
The log message.
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
The time at which the output method (Log, Info, etc.) was called.
OSLightDark
Generated using TypeDoc