UNPKG

804 BTypeScriptView Raw
1import ILoggerStrategy, { LogLevels } from "./ILoggerStrategy";
2/**
3 * A logger strategy can log to console or file.
4 *
5 * @export
6 * @class WinstonLoggerStrategy
7 * @implements {ILoggerStrategy}
8 */
9export default class WinstonLoggerStrategy implements ILoggerStrategy {
10 private readonly winstonLogger;
11 private readonly consoleTransport?;
12 private readonly fileTransport?;
13 /**
14 * Creates an instance of WinstonLoggerStrategy.
15 *
16 * @param {LogLevels} [level=LogLevels.Debug]
17 * @param {string} [logfile] Log to specific file, otherwise to console.
18 * @memberof WinstonLoggerStrategy
19 */
20 constructor(level?: LogLevels, logfile?: string);
21 log(level: LogLevels, message: string, contextID?: string): void;
22}
23//# sourceMappingURL=WinstonLoggerStrategy.d.ts.map
\No newline at end of file