-
Notifications
You must be signed in to change notification settings - Fork 1
/
logger_helper.go
125 lines (100 loc) · 5.28 KB
/
logger_helper.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
114
115
116
117
118
119
120
121
122
123
124
125
package log
import (
gxplugin "git.golaxy.org/core/plugin"
)
// Trace logs a message at TraceLevel, spaces are added between operands when neither is a string and a newline is appended.
func Trace(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Log(TraceLevel, v...)
}
// Traceln logs a message at TraceLevel, spaces are always added between operands and a newline is appended.
func Traceln(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Logln(TraceLevel, v...)
}
// Tracef logs a formatted message at TraceLevel.
func Tracef(pluginProvider gxplugin.PluginProvider, format string, v ...interface{}) {
Using(pluginProvider).Logf(TraceLevel, format, v...)
}
// Debug logs a message at DebugLevel, spaces are added between operands when neither is a string and a newline is appended.
func Debug(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Log(DebugLevel, v...)
}
// Debugln logs a message at DebugLevel, spaces are always added between operands and a newline is appended.
func Debugln(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Logln(DebugLevel, v...)
}
// Debugf logs a formatted message at DebugLevel.
func Debugf(pluginProvider gxplugin.PluginProvider, format string, v ...interface{}) {
Using(pluginProvider).Logf(DebugLevel, format, v...)
}
// Info logs a message at InfoLevel, spaces are added between operands when neither is a string and a newline is appended.
func Info(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Log(InfoLevel, v...)
}
// Infoln logs a message at InfoLevel, spaces are always added between operands and a newline is appended.
func Infoln(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Logln(InfoLevel, v...)
}
// Infof logs a formatted message at InfoLevel.
func Infof(pluginProvider gxplugin.PluginProvider, format string, v ...interface{}) {
Using(pluginProvider).Logf(InfoLevel, format, v...)
}
// Warn logs a message at WarnLevel, spaces are added between operands when neither is a string and a newline is appended.
func Warn(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Log(WarnLevel, v...)
}
// Warnln logs a message at WarnLevel, spaces are always added between operands and a newline is appended.
func Warnln(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Logln(WarnLevel, v...)
}
// Warnf logs a formatted message at WarnLevel.
func Warnf(pluginProvider gxplugin.PluginProvider, format string, v ...interface{}) {
Using(pluginProvider).Logf(WarnLevel, format, v...)
}
// Error logs a message at ErrorLevel, spaces are added between operands when neither is a string and a newline is appended.
func Error(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Log(ErrorLevel, v...)
}
// Errorln logs a message at ErrorLevel, spaces are always added between operands and a newline is appended.
func Errorln(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Logln(ErrorLevel, v...)
}
// Errorf logs a formatted message at ErrorLevel.
func Errorf(pluginProvider gxplugin.PluginProvider, format string, v ...interface{}) {
Using(pluginProvider).Logf(ErrorLevel, format, v...)
}
// DPanic logs a message at DPanicLevel, spaces are added between operands when neither is a string and a newline is appended.
func DPanic(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Log(DPanicLevel, v...)
}
// DPanicln logs a message at DPanicLevel, spaces are always added between operands and a newline is appended.
func DPanicln(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Logln(DPanicLevel, v...)
}
// DPanicf logs a formatted message at DPanicLevel.
func DPanicf(pluginProvider gxplugin.PluginProvider, format string, v ...interface{}) {
Using(pluginProvider).Logf(DPanicLevel, format, v...)
}
// Panic logs a message at PanicLevel, spaces are added between operands when neither is a string and a newline is appended.
func Panic(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Log(PanicLevel, v...)
}
// Panicln logs a message at PanicLevel, spaces are always added between operands and a newline is appended.
func Panicln(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Logln(PanicLevel, v...)
}
// Panicf logs a formatted message at PanicLevel.
func Panicf(pluginProvider gxplugin.PluginProvider, format string, v ...interface{}) {
Using(pluginProvider).Logf(PanicLevel, format, v...)
}
// Fatal logs a message at FatalLevel, spaces are added between operands when neither is a string and a newline is appended.
func Fatal(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Log(FatalLevel, v...)
}
// Fatalln logs a message at FatalLevel, spaces are always added between operands and a newline is appended.
func Fatalln(pluginProvider gxplugin.PluginProvider, v ...interface{}) {
Using(pluginProvider).Logln(FatalLevel, v...)
}
// Fatalf logs a formatted message at FatalLevel.
func Fatalf(pluginProvider gxplugin.PluginProvider, format string, v ...interface{}) {
Using(pluginProvider).Logf(FatalLevel, format, v...)
}