64 lines
1.2 KiB
Go
64 lines
1.2 KiB
Go
|
package log
|
||
|
|
||
|
import (
|
||
|
"git.shikicc.com/golang/kit/log/zaplog"
|
||
|
)
|
||
|
|
||
|
var L = zaplog.New(zaplog.Config{
|
||
|
Mode: zaplog.Debug,
|
||
|
DebugLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/debug",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
InfoLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/info",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
WarnLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/warn",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
ErrorLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/error",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
FatalLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/fatal",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
})
|
||
|
|
||
|
var W = zaplog.New(zaplog.Config{
|
||
|
Mode: zaplog.Debug,
|
||
|
DebugLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/web_debug",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
InfoLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/web_info",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
WarnLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/web_warn",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
ErrorLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/web_error",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
FatalLog: zaplog.LogFileConfig{
|
||
|
Filename: "log/web_fatal",
|
||
|
FileSize_MB: 1,
|
||
|
FileBackup: 3,
|
||
|
},
|
||
|
})
|