mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Merge pull request #23414 from luoto/allow-loggerinstance-to-take-string
[winston] Allow LoggerInstance.remove to take string
This commit is contained in:
Vendored
+1
-1
@@ -223,7 +223,7 @@ declare namespace winston {
|
||||
unhandleExceptions(...transports: TransportInstance[]): void;
|
||||
add(transport: TransportInstance, options?: TransportOptions, created?: boolean): LoggerInstance;
|
||||
clear(): void;
|
||||
remove(transport: TransportInstance): LoggerInstance;
|
||||
remove(transport: string | 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;
|
||||
|
||||
@@ -260,6 +260,9 @@ logger = new (winston.Logger)({
|
||||
]
|
||||
});
|
||||
|
||||
/* Remove transport by name */
|
||||
logger = logger.remove('nooo');
|
||||
|
||||
/* Reconfigure logger */
|
||||
logger.configure({ level: 'silly' });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user