forked from getndazn/dazn-lambda-powertools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
55 lines (38 loc) · 1.46 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import CorrelationIds from "@dazn/lambda-powertools-correlation-ids";
export = dazn__lambda_powertools_logger;
declare enum LogLevels {
DEBUG = 20,
INFO = 30,
WARN = 40,
ERROR = 50,
}
declare class dazn__lambda_powertools_logger {
correlationIds: CorrelationIds;
originalLevel: string;
level: string;
constructor(argument?: { correlationIds?: CorrelationIds; level?: string });
appendError<T>(params: T, err: Error): T & Error;
debug(message: string, params?: Record<string, any>): void;
enableDebug(): () => void;
error(message: string, err?: Error): void;
error(message: string, params?: Record<string, any>, err?: Error): void;
info(message: string, params?: Record<string, any>): void;
isEnabled(level: 20 | 30 | 40 | 50): Boolean;
log(levelName: string, message: string, params?: Record<string, any>): void;
resetLevel(): void;
warn(message: string, err?: Error): void;
warn(message: string, params?: Record<string, any>, err?: Error): void;
static debug(message: string, params?: Record<string, any>): void;
static enableDebug(): () => void;
static error(message: string, err?: Error): void;
static error(
message: string,
params?: Record<string, any>,
err?: Error
): void;
static info(message: string, params?: Record<string, any>): void;
static level: string;
static resetLevel(): void;
static warn(message: string, err?: Error): void;
static warn(message: string, params?: any, err?: Error): void;
}