Interface LoggingOptsFile

Hierarchy

Properties

colorize?: boolean

Should the logs color-code the level strings in the output.

console?: "debug" | "info" | "warn" | "error" | "trace" | "off"

The log level used by the console output.

fileDatePattern?: string

The moment.js compatible date string to use when naming files.

files: {
    [filename: string]: LogLevel;
}

An object mapping a file name to a logging level. The file will contain all logs for that level inclusive up to the highest level. (info will contain warn, error etc) Use %DATE% to set the date of the file within the string. Use the fileDatePattern to set the date format.

Example

{"info-%DATE%.log": "info"}

Type declaration

json?: boolean

Should the logs be outputted in JSON format, for consumption by a collector.

maxFiles?: number

The number of files to keep before the last file is rotated. If not set, no files are deleted.

timestampFormat?: string

Timestamp format used in the log output.

Default

"HH:mm:ss:SSS"

Generated using TypeDoc