-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.go
More file actions
70 lines (58 loc) · 1.9 KB
/
log.go
File metadata and controls
70 lines (58 loc) · 1.9 KB
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
package log
// ILogger is the basic logger interface
type ILogger interface {
Trace(s string)
Tracef(format string, args ...interface{})
Debug(n uint32, s string)
Debugf(n uint32, format string, args ...interface{})
Info(s string)
Infof(format string, args ...interface{})
Warn(s string)
Warnf(format string, args ...interface{})
Error(s string)
Errorf(format string, args ...interface{})
}
// ILoggerFactory is the basic logger factory interface
type ILoggerFactory interface {
NewLogger(scope string) ILogger
}
// Trace emits the preformatted message if the logger is at or below trace-level
func Trace(s string) {
std.Trace(s)
}
// Tracef formats and emits a message if the logger is at or below trace-level
func Tracef(format string, args ...interface{}) {
std.Tracef(format, args...)
}
// Debug emits the preformatted message if the logger is at or below debug-level
func Debug(n uint32, s string) {
std.Debug(n, s)
}
// Debugf formats and emits a message if the logger is at or below debug-level
func Debugf(n uint32, format string, args ...interface{}) {
std.Debugf(n, format, args...)
}
// Info emits the preformatted message if the logger is at or below info-level
func Info(s string) {
std.Info(s)
}
// Infof formats and emits a message if the logger is at or below info-level
func Infof(format string, args ...interface{}) {
std.Infof(format, args...)
}
// Warn emits the preformatted message if the logger is at or below warn-level
func Warn(s string) {
std.Warn(s)
}
// Warnf formats and emits a message if the logger is at or below warn-level
func Warnf(format string, args ...interface{}) {
std.Warnf(format, args...)
}
// Error emits the preformatted message if the logger is at or below error-level
func Error(s string) {
std.Error(s)
}
// Errorf formats and emits a message if the logger is at or below error-level
func Errorf(format string, args ...interface{}) {
std.Errorf(format, args...)
}