From 1fbfdc6924c5ec9e66840dfdb29ac4f0149572ed Mon Sep 17 00:00:00 2001 From: Andrew Throener Date: Thu, 6 Oct 2016 14:45:46 -0500 Subject: [PATCH] fix(winston): add configure method (#11797) --- winston/winston-tests.ts | 3 +++ winston/winston.d.ts | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/winston/winston-tests.ts b/winston/winston-tests.ts index a82390d1a3..60423f9fc8 100644 --- a/winston/winston-tests.ts +++ b/winston/winston-tests.ts @@ -263,3 +263,6 @@ var logger: winston.LoggerInstance = new (winston.Logger)({ }), ] }); + +/* Reconfigure logger */ +logger.configure({ level: 'silly' }); diff --git a/winston/winston.d.ts b/winston/winston.d.ts index 3b021bf097..762e69532f 100644 --- a/winston/winston.d.ts +++ b/winston/winston.d.ts @@ -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; }