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
@@ -100,7 +100,7 @@ type ffCmd struct {
func (j *ffCmd) start() error {
cmd := exec.Command(j.args[0], j.args[1:]...) // #nosec
cmd.Stdout = j.out
if log.CurrentLevel() >= log.LevelTrace {
if log.IsGreaterOrEqualTo(log.LevelTrace) {
cmd.Stderr = os.Stderr
} else {
cmd.Stderr = io.Discard