-
Notifications
You must be signed in to change notification settings - Fork 1
/
logger.go
59 lines (49 loc) · 1.15 KB
/
logger.go
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
package glo
// Logger logs a line with a specific level
type Logger interface {
Log(Level, string, ...interface{}) error
}
// LoggerSeverity includes all levels
type LoggerSeverity interface {
Logger
LoggerDebug
LoggerInfo
LoggerNotice
LoggerWarning
LoggerError
LoggerCritical
LoggerAlert
LoggerEmergency
}
// LoggerDebug logs a debug line
type LoggerDebug interface {
Debug(string, ...interface{}) error
}
// LoggerInfo logs an info line
type LoggerInfo interface {
Info(string, ...interface{}) error
}
// LoggerNotice logs a notice line
type LoggerNotice interface {
Notice(string, ...interface{}) error
}
// LoggerWarning logs a warning line
type LoggerWarning interface {
Warning(string, ...interface{}) error
}
// LoggerError logs an error line
type LoggerError interface {
Error(string, ...interface{}) error
}
// LoggerCritical logs a critical line
type LoggerCritical interface {
Critical(string, ...interface{}) error
}
// LoggerAlert logs an alert line
type LoggerAlert interface {
Alert(string, ...interface{}) error
}
// LoggerEmergency logs an emergency line
type LoggerEmergency interface {
Emergency(string, ...interface{}) error
}