mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-19 17:34:59 +03:00
Refine log output
This commit is contained in:
@@ -27,7 +27,11 @@ type abstractLogrusLogger interface {
|
||||
func NewLogrusLogger(options option.LogOption) (*logrusLogger, error) {
|
||||
logger := logrus.New()
|
||||
logger.SetLevel(logrus.TraceLevel)
|
||||
logger.Formatter.(*logrus.TextFormatter).ForceColors = true
|
||||
logger.SetFormatter(&LogrusTextFormatter{
|
||||
DisableColors: options.DisableColor || options.Output != "",
|
||||
DisableTimestamp: !options.Timestamp && options.Output != "",
|
||||
FullTimestamp: options.Timestamp,
|
||||
})
|
||||
logger.AddHook(new(logrusHook))
|
||||
var err error
|
||||
if options.Level != "" {
|
||||
|
||||
Reference in New Issue
Block a user