-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.go
More file actions
46 lines (35 loc) · 729 Bytes
/
Copy pathdefault.go
File metadata and controls
46 lines (35 loc) · 729 Bytes
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
package log
var std = NewLog(defaultLogger())
func defaultLogger() Logger {
var logger = NewLogger()
stdout := NewStdoutRecorder(FormatColorText)
stderr := NewStdoutRecorder(FormatColorText)
logger.SetDefault(stdout)
logger.SetRecorder(stdout, "DEBUG", "INFO")
logger.SetRecorder(stderr, "WARNING", "ERROR")
return logger
}
func Debug(v ...interface{}) {
std.Debug(v...)
}
func Info(v ...interface{}) {
std.Info(v...)
}
func Warning(v ...interface{}) {
std.Warning(v...)
}
func Error(v ...interface{}) {
std.Error(v...)
}
func D(v ...interface{}) {
std.Debug(v...)
}
func I(v ...interface{}) {
std.Info(v...)
}
func W(v ...interface{}) {
std.Warning(v...)
}
func E(v ...interface{}) {
std.Error(v...)
}