mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
log support print report_line
This commit is contained in:
parent
aa54ed5610
commit
e19e797aac
7
main.go
7
main.go
@ -69,7 +69,7 @@ func init() {
|
||||
|
||||
conf = getConfig()
|
||||
if conf == nil {
|
||||
return
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
logFormatter := &easy.Formatter{
|
||||
@ -82,6 +82,11 @@ func init() {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// 更加彻底的调试 将在标准输出中打印执行行数
|
||||
if conf.Debug {
|
||||
log.SetReportCaller(true)
|
||||
}
|
||||
|
||||
log.AddHook(global.NewLocalHook(w, logFormatter, global.GetLogLevel(conf.LogLevel)...))
|
||||
|
||||
if !global.PathExists(global.IMAGE_PATH) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user