mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-08-15 22:01:46 +00:00
Update dependencies & use better log formatter
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
nested "github.com/antonfisher/nested-logrus-formatter"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/yosuke-furukawa/json5/encoding/json5"
|
||||
"io/ioutil"
|
||||
@@ -44,9 +45,10 @@ func init() {
|
||||
TimestampFormat: tsFormat,
|
||||
})
|
||||
} else {
|
||||
logrus.SetFormatter(&logrus.TextFormatter{
|
||||
ForceColors: true,
|
||||
FullTimestamp: true,
|
||||
logrus.SetFormatter(&nested.Formatter{
|
||||
FieldsOrder: []string{
|
||||
"config", "file", "mode", "addr", "src", "dst", "session", "action", "error",
|
||||
},
|
||||
TimestampFormat: tsFormat,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user