-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathindex.d.ts
41 lines (37 loc) · 1.42 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
39
40
41
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*--------------------------------------------------------------------------------------------*/
export const version: number;
export function setLevel(level: number): void;
export function setFlushOn(level: number): void;
export function createRotatingLogger(name: string, filename: string, filesize: number, filecount: number): Promise<Logger>;
export function createAsyncRotatingLogger(name: string, filename: string, filesize: number, filecount: number): Promise<Logger>;
export enum LogLevel {
Trace,
Debug,
Info,
Warning,
Error,
Critical,
Off
}
export class Logger {
constructor(loggerType: "rotating" | "rotating_async" | "stdout_async", name: string, filename: string, filesize: number, filecount: number);
trace(message: string): void;
debug(message: string): void;
info(message: string): void;
warn(message: string): void;
error(message: string): void;
critical(message: string): void;
getLevel(): number;
setLevel(level: number): void;
setPattern(pattern: string): void;
clearFormatters(): void;
/**
* A synchronous operation to flush the contents into file
*/
flush(): void;
drop(): void;
}