fix(winston): add configure method (#11797)

This commit is contained in:
Andrew Throener
2016-10-06 14:45:46 -05:00
committed by Mohamed Hegazy
parent f89b94bcf7
commit 1fbfdc6924
2 changed files with 6 additions and 2 deletions

View File

@@ -263,3 +263,6 @@ var logger: winston.LoggerInstance = new (winston.Logger)({
}),
]
});
/* Reconfigure logger */
logger.configure({ level: 'silly' });

View File

@@ -46,6 +46,7 @@ declare module "winston" {
export function setLevels(target: any): any;
export function cli(): LoggerInstance;
export function close(): void;
export function configure(options: LoggerOptions): void;
export interface ExceptionProcessInfo {
pid: number;
@@ -124,10 +125,10 @@ declare module "winston" {
remove(transport: TransportInstance): LoggerInstance;
startTimer(): ProfileHandler;
profile(id: string, msg?: string, meta?: any, callback?: (err: Error, level: string, msg: string, meta: any) => void): LoggerInstance;
configure(options: LoggerOptions): void;
setLevels(target: any): any;
cli(): LoggerInstance;
level: string;
}