Add log.IsGreaterOrEqualTo, that take into consideration path-scoped log levels

This commit is contained in:
Deluan
2023-12-25 16:29:59 -05:00
parent 03119e5ccf
commit 51e07d4cb5
13 changed files with 60 additions and 19 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ func Read(filename string) (tags map[string][]string, err error) {
case C.TAGLIB_ERR_AUDIO_PROPS:
return nil, fmt.Errorf("can't get audio properties from file")
}
if log.CurrentLevel() >= log.LevelDebug {
if log.IsGreaterOrEqualTo(log.LevelDebug) {
j, _ := json.Marshal(m)
log.Trace("TagLib: read tags", "tags", string(j), "filename", filename, "id", id)
} else {