mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 04:27:37 +03:00
Add trace level to log
This commit is contained in:
parent
2384665cfb
commit
57390fcda3
1 changed files with 9 additions and 0 deletions
|
@ -20,6 +20,7 @@ const (
|
|||
LevelWarn = Level(logrus.WarnLevel)
|
||||
LevelInfo = Level(logrus.InfoLevel)
|
||||
LevelDebug = Level(logrus.DebugLevel)
|
||||
LevelTrace = Level(logrus.TraceLevel)
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -84,6 +85,14 @@ func Debug(args ...interface{}) {
|
|||
logger.Debug(msg)
|
||||
}
|
||||
|
||||
func Trace(args ...interface{}) {
|
||||
if currentLevel < LevelTrace {
|
||||
return
|
||||
}
|
||||
logger, msg := parseArgs(args)
|
||||
logger.Trace(msg)
|
||||
}
|
||||
|
||||
func parseArgs(args []interface{}) (*logrus.Entry, string) {
|
||||
var l *logrus.Entry
|
||||
var err error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue