platform/node/file-log-sink
Classes
Section titled “Classes”RotatingFileLogSink
Section titled “RotatingFileLogSink”Defined in: app/src/platform/node/file-log-sink.ts:22
Writes log records as JSON Lines to a local file and rotates it by size. Logs never leave the device. Write errors are swallowed, because logging must never break the browser.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RotatingFileLogSink(
options):RotatingFileLogSink
Defined in: app/src/platform/node/file-log-sink.ts:28
Parameters
Section titled “Parameters”options
Section titled “options”Location and rotation limits.
Returns
Section titled “Returns”Methods
Section titled “Methods”write()
Section titled “write()”write(
record):void
Defined in: app/src/platform/node/file-log-sink.ts:33
Writes one record.
Parameters
Section titled “Parameters”record
Section titled “record”The record to write.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Interfaces
Section titled “Interfaces”RotatingFileLogOptions
Section titled “RotatingFileLogOptions”Defined in: app/src/platform/node/file-log-sink.ts:6
Options for a RotatingFileLogSink.
Properties
Section titled “Properties”directory
Section titled “directory”
readonlydirectory:string
Defined in: app/src/platform/node/file-log-sink.ts:8
Directory of the log files.
readonlyoptionalkeep?:number
Defined in: app/src/platform/node/file-log-sink.ts:14
Number of rotated files kept besides the current one. Defaults to 2.
maxBytes?
Section titled “maxBytes?”
readonlyoptionalmaxBytes?:number
Defined in: app/src/platform/node/file-log-sink.ts:12
Size at which the current file is rotated. Defaults to 5 MB.
readonlyname:string
Defined in: app/src/platform/node/file-log-sink.ts:10
Base name; files are <name>.log, <name>.1.log, …