interface LoggingOptsFile {
    colorize?: boolean;
    console?: "error" | "off" | "warn" | "info" | "debug" | "trace";
    fileDatePattern?: string;
    files: {
        [filename: string]: LogLevel;
    };
    json?: boolean;
    maxFiles?: number;
    timestampFormat?: string;
}

Hierarchy (view full)

Properties

colorize?: boolean

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

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

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.

Type declaration

Example

{"info-%DATE%.log": "info"}
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