-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.go
40 lines (30 loc) · 901 Bytes
/
default.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
package tinylog
// default logger
var defaultLogger = newDefaultLogger(INFO)
func SetFileConfig(fileName string, maxSizeMb, maxBackupCount, maxKeepDays int) {
defaultLogger.SetFileConfig(fileName, maxSizeMb, maxBackupCount, maxKeepDays)
}
func SetLevel(level LogLevel) {
defaultLogger.SetLevel(level)
}
func GetLevelName() string {
return defaultLogger.GetLevelName()
}
func Debug(format string, v ...interface{}) {
defaultLogger.Debug(format, v...)
}
func Info(format string, v ...interface{}) {
defaultLogger.Info(format, v...)
}
func Warn(format string, v ...interface{}) {
defaultLogger.Warn(format, v...)
}
func Error(format string, v ...interface{}) {
defaultLogger.Error(format, v...)
}
func ErrorNoStackTrace(format string, v ...interface{}) {
defaultLogger.ErrorNoStackTrace(format, v...)
}
func Fatal(format string, v ...interface{}) {
defaultLogger.Fatal(format, v...)
}