-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlogger.go
71 lines (60 loc) · 1.44 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
package gone
import (
"log"
)
var _defaultLogger = &defaultLogger{Logger: new(log.Logger)}
func NewSimpleLogger() (Goner, GonerId, GonerOption) {
return _defaultLogger, IdGoneLogger, IsDefault(new(Logger))
}
func GetSimpleLogger() Logger {
return _defaultLogger
}
type defaultLogger struct {
Flag
*log.Logger
}
func (l *defaultLogger) Tracef(format string, args ...any) {
log.Printf(format, args...)
}
func (l *defaultLogger) Debugf(format string, args ...any) {
log.Printf(format, args...)
}
func (l *defaultLogger) Infof(format string, args ...any) {
log.Printf(format, args...)
}
func (l *defaultLogger) Warnf(format string, args ...any) {
log.Printf(format, args...)
}
func (l *defaultLogger) Errorf(format string, args ...any) {
log.Printf(format, args...)
}
func (l *defaultLogger) Trace(args ...any) {
log.Print(args...)
}
func (l *defaultLogger) Debug(args ...any) {
log.Print(args...)
}
func (l *defaultLogger) Info(args ...any) {
log.Print(args...)
}
func (l *defaultLogger) Warn(args ...any) {
log.Print(args...)
}
func (l *defaultLogger) Error(args ...any) {
log.Print(args...)
}
func (l *defaultLogger) Traceln(args ...any) {
log.Println(args...)
}
func (l *defaultLogger) Debugln(args ...any) {
log.Println(args...)
}
func (l *defaultLogger) Infoln(args ...any) {
log.Println(args...)
}
func (l *defaultLogger) Warnln(args ...any) {
log.Println(args...)
}
func (l *defaultLogger) Errorln(args ...any) {
log.Println(args...)
}