forked from YoungPioneers/blog4go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaultWriter.go
113 lines (81 loc) · 2.76 KB
/
defaultWriter.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// Copyright (c) 2023, huangjunwei <huangjunwei@youmi.net>. All rights reserved.
package blog4go
// DefaultWriter default empty logger
type DefaultWriter struct{}
// Close .
func (writer *DefaultWriter) Close() {}
// SetLevel set logging level threshold
func (writer *DefaultWriter) SetLevel(level LevelType) {}
// Level get log level
func (writer *DefaultWriter) Level() LevelType {
return TRACE
}
// write/writef functions with different levels
func (writer *DefaultWriter) write(level LevelType, args ...interface{}) {}
func (writer *DefaultWriter) writef(level LevelType, format string, args ...interface{}) {}
// Debug .
func (writer *DefaultWriter) Debug(args ...interface{}) {}
// Debugf .
func (writer *DefaultWriter) Debugf(format string, args ...interface{}) {}
// Trace .
func (writer *DefaultWriter) Trace(args ...interface{}) {}
// Tracef .
func (writer *DefaultWriter) Tracef(format string, args ...interface{}) {}
// Info .
func (writer *DefaultWriter) Info(args ...interface{}) {}
// Infof .
func (writer *DefaultWriter) Infof(format string, args ...interface{}) {}
// Warn .
func (writer *DefaultWriter) Warn(args ...interface{}) {}
// Warnf .
func (writer *DefaultWriter) Warnf(format string, args ...interface{}) {}
// Error .
func (writer *DefaultWriter) Error(args ...interface{}) {}
// Errorf .
func (writer *DefaultWriter) Errorf(format string, args ...interface{}) {}
// Critical .
func (writer *DefaultWriter) Critical(args ...interface{}) {}
// Criticalf .
func (writer *DefaultWriter) Criticalf(format string, args ...interface{}) {}
// flush log to disk
func (writer *DefaultWriter) flush() {}
// SetHook .
func (writer *DefaultWriter) SetHook(hook Hook) {}
// SetHookLevel .
func (writer *DefaultWriter) SetHookLevel(level LevelType) {}
// SetHookAsync .
func (writer *DefaultWriter) SetHookAsync(async bool) {}
// SetTimeRotated .
func (writer *DefaultWriter) SetTimeRotated(timeRotated bool) {}
// TimeRotated .
func (writer *DefaultWriter) TimeRotated() bool {
return false
}
func (writer *DefaultWriter) SetRotateSize(rotateSize int64) {}
func (writer *DefaultWriter) RotateSize() int64 {
return 0
}
// SetRotateLines .
func (writer *DefaultWriter) SetRotateLines(rotateLines int) {}
// RotateLines .
func (writer *DefaultWriter) RotateLines() int {
return 0
}
// SetRetentions .
func (writer *DefaultWriter) SetRetentions(retentions int64) {}
// Retentions .
func (writer *DefaultWriter) Retentions() int64 {
return 0
}
// SetColored .
func (writer *DefaultWriter) SetColored(colored bool) {}
// Colored .
func (writer *DefaultWriter) Colored() bool {
return false
}
// SetTags .
func (writer *DefaultWriter) SetTags(tags map[string]string) {}
// Tags .
func (writer *DefaultWriter) Tags() map[string]string {
return map[string]string{}
}