-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.d.ts
39 lines (27 loc) · 1.06 KB
/
index.d.ts
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
36
37
38
import { FileTransportOptions, ConsoleTransportOptions } from "winston";
declare class RocketLogger {
static create(options?: RocketLogger.RocketLoggerOptions): RocketLogger;
log(level: string, message: string | Error | object, meta?: object | string): void;
error(message: string | Error, meta?: Error | object | string): void;
debug(message: string, meta?: object): void;
info(message: string, meta?: object): void;
warn(message: string, meta?: object): void;
}
export = RocketLogger;
declare namespace RocketLogger {
export interface ExtendFileTransportOptions extends FileTransportOptions {
errorFileName?: string
}
export interface MongoDBTransportOptions {
mongodbServer: string;
collection: string;
errorCollection: string;
mongodbOptions: any;
label: string;
}
export interface RocketLoggerOptions {
file?: ExtendFileTransportOptions | boolean;
db?: MongoDBTransportOptions | boolean;
console?: ConsoleTransportOptions | boolean;
}
}