-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
98 lines (84 loc) · 2.61 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
declare module "lamlog" {
class Logger {
constructor(name:string);
constructor(config:Logger.Settings);
/**
* Creates a child logger from the parent. Helpful when you have a
* dependency and want to maintain a logging relationship to the parent.
* @param name
*/
child(name:Logger.Settings | string):Logger;
/**
* Creates a timer with the given name.
*
* @param defaults
*/
timer(name:string):Logger.Timer;
/**
* Locates the configuration in the environment.
*
* @param name
* @param inlineDefault
*/
setLevel(level:string):any;
/**
* Trace level messages will only show if trace level logging is enabled.
*
* @param message To send to the console.
* @param object provide context to the message.
*/
trace(message:string,object?:any):void;
/**
* Debug level messages show if debug or lower (trace) level logging is set.
*
* @param message To send to the console.
* @param object provide context to the message.
*/
debug(message:string,object?:any):void;
/**
* Info level messages show if info or lower (trace) level logging is set.
*
* @param message To send to the console.
* @param object provide context to the message.
*/
info(message:string,object?:any):void;
/**
* Log level messages show if info or lower (trace) level logging is set.
*
* @param message To send to the console.
* @param object provide context to the message.
*/
log(message:string,object?:any):void;
/**
* Warn level messages show if info or lower (trace) level logging is set.
*
* @param message To send to the console.
* @param object provide context to the message.
*/
warn(message:string,object?:any):void;
/**
* Error level messages show if info or lower (trace) level logging is set.
*
* @param message To send to the console.
* @param object provide context to the message.
*/
error(message:string,object?:any):void;
}
namespace Logger {
export interface Timer {
name:string;
timestamp:any;
}
export interface Settings {
/**
* Name of this logger.
*/
name:string;
/**
* The log level, and above, messages to display.
*/
level:string;
}
}
export = Logger;
}