-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogger.go
76 lines (57 loc) · 2.52 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package inter
import (
"github.com/confetti-framework/syslog/log_level"
)
// Logger This interface is the interface you should use to add a logger yourself.
type Logger interface {
SetApp(app AppReader) Logger
Clear() bool
Group(group string) Logger
Log(severity log_level.Level, message string, arguments ...interface{})
LogWith(severity log_level.Level, message string, data interface{})
}
// LoggerFacade This interface ensures that the loggers can be used with
// the convenient leveling methods. That while the concrete
// logger only needs to implement inter.Logger.
type LoggerFacade interface {
SetApp(app AppReader) LoggerFacade
Group(group string) LoggerFacade
Log(severity log_level.Level, message string, arguments ...interface{})
LogWith(severity log_level.Level, message string, data interface{})
// Emergency Log that the system is unusable
Emergency(message string, arguments ...interface{})
// EmergencyWith Log that the system is unusable
EmergencyWith(message string, data interface{})
// Alert A condition that should be corrected immediately.
Alert(message string, arguments ...interface{})
// AlertWith A condition that should be corrected immediately.
AlertWith(message string, data interface{})
// Critical conditions
Critical(message string, arguments ...interface{})
// CriticalWith Critical conditions
CriticalWith(message string, data interface{})
// Error conditions
Error(message string, arguments ...interface{})
// ErrorWith Error conditions
ErrorWith(message string, data interface{})
// Warning conditions
Warning(message string, arguments ...interface{})
// WarningWith Warning conditions
WarningWith(message string, data interface{})
// Notice Normal but significant conditions
// Conditions that are not error conditions, but that may require special handling.
Notice(message string, arguments ...interface{})
// NoticeWith Normal but significant conditions
// Conditions that are not error conditions, but that may require special handling.
NoticeWith(message string, data interface{})
// Info Informational messages
Info(message string, arguments ...interface{})
// InfoWith Informational messages
InfoWith(message string, data interface{})
// Debug Debug-level messages
// Messages containing information that is normally only useful when debugging a program.
Debug(message string, arguments ...interface{})
// DebugWith Debug-level messages
// Messages containing information that is normally only useful when debugging a program.
DebugWith(message string, data interface{})
}