API reference / @jsprismarine/logger / PrismarineTransport
Class: PrismarineTransport
Defined in: transport.ts:47
Transport for the interactive JSPrismarine console. Records are buffered until a console attaches, then replayed in order, so lines logged during boot still reach the console. The buffer holds at most capacity records; once a console attaches, a dropped backlog is announced with one plain line before the retained records are replayed.
Implements
Constructors
Constructor
new PrismarineTransport(
options?):PrismarineTransport
Defined in: transport.ts:56
Parameters
options?
PrismarineTransportOptions = {}
Returns
PrismarineTransport
Properties
console
console:
ConsoleLike|undefined
Defined in: transport.ts:48
Accessors
dropped
Get Signature
get dropped():
number
Defined in: transport.ts:64
Records dropped from the replay buffer since the last replay. Resets to zero once the retained records are written to the console.
Returns
number
Methods
log()
log(
record):void
Defined in: transport.ts:73
Writes the record to the console, replaying any buffered records first. Without a console the record is buffered, dropping the oldest when the buffer is full.
Parameters
record
Returns
void