-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.go
63 lines (48 loc) · 1.34 KB
/
log.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
package gRouter
import "fmt"
type ILog interface {
Debug(args ...interface{})
Info(args ...interface{})
Warn(args ...interface{})
Error(args ...interface{})
Fatal(args ...interface{})
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Warnf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Fatalf(format string, args ...interface{})
}
type log struct {
}
func (log *log) Debug(args ...interface{}) {
fmt.Println(args...)
}
func (log *log) Info(args ...interface{}) {
fmt.Println(args...)
}
func (log *log) Warn(args ...interface{}) {
fmt.Println(args...)
}
func (log *log) Error(args ...interface{}) {
fmt.Println(args...)
}
func (log *log) Fatal(args ...interface{}) {
fmt.Println(args...)
}
func (log *log) Debugf(format string, args ...interface{}) {
fmt.Println(fmt.Sprintf(format, args))
}
func (log *log) Infof(format string, args ...interface{}) {
fmt.Println(fmt.Sprintf(format, args...))
}
func (log *log) Warnf(format string, args ...interface{}) {
}
func (log *log) Warningf(format string, args ...interface{}) {
fmt.Println(fmt.Sprintf(format, args))
}
func (log *log) Errorf(format string, args ...interface{}) {
fmt.Println(fmt.Sprintf(format, args))
}
func (log *log) Fatalf(format string, args ...interface{}) {
fmt.Println(fmt.Sprintf(format, args))
}