winston-cloud-logging
Version:
Cloud logging compatible logging with Winston
30 lines (29 loc) • 799 B
TypeScript
import * as winston from "winston";
export declare enum WinstonLevel {
Emergency = "emerg",
Alert = "alert",
Critical = "crit",
Error = "error",
Warning = "warn",
Notice = "notice",
Info = "info",
Debug = "debug"
}
export declare enum CloudLoggingSeverity {
Emergency = "EMERGENCY",
Alert = "ALERT",
Critical = "CRITICAL",
Error = "ERROR",
Warning = "WARNING",
Notice = "NOTICE",
Info = "INFO",
Debug = "DEBUG"
}
export declare const LEVEL_TO_SEVERITY: {
[level in WinstonLevel]: CloudLoggingSeverity;
};
/**
* Creates Cloud Logging Winston format.
* The format transformation maps Winston "level" log property to the Cloud Logging compatible "severity" log property.
*/
export declare const format: winston.Logform.FormatWrap;