-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
35 lines (34 loc) · 1.26 KB
/
index.d.ts
File metadata and controls
35 lines (34 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* Factory to create a Winston logger instance.
* @param options Optional logger options.
* @param options.level Log level (default: process.env.LOG_LEVEL or 'info')
* @param options.transports Array of Winston transports (default: Console)
* @returns winston.Logger
*
* Note: All logger methods accept either (message, metaObject) or (message, primitive/array),
* where primitives/arrays are wrapped as { value: ... }.
*/
export declare function createLogger(options?: {
level?: string;
transports?: any[];
}): import('winston').Logger & {
debug(message: string, meta?: any): void;
info(message: string, meta?: any): void;
warn(message: string, meta?: any): void;
error(message: string, meta?: any): void;
// ...other winston log levels if needed
};
/**
* Default logger instance.
*
* All logger methods accept either (message, metaObject) or (message, primitive/array),
* where primitives/arrays are wrapped as { value: ... }.
*/
export declare const log: import('winston').Logger & {
debug(message: string, meta?: any): void;
info(message: string, meta?: any): void;
warn(message: string, meta?: any): void;
error(message: string, meta?: any): void;
// ...other winston log levels if needed
};
export default log;