Skip to content

Commit e95cea2

Browse files
authored
fix: only log errors to stderr if not debug mode (#84)
Fixes #79
1 parent 89fce8d commit e95cea2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ func main() {
6868
log.Debug("🚀 Starting diffnav", "logFile",
6969
wd+string(os.PathSeparator)+logFile.Name())
7070
}
71+
} else {
72+
log.SetOutput(os.Stderr)
73+
log.SetLevel(log.FatalLevel)
7174
}
7275

7376
reader := bufio.NewReader(os.Stdin)

0 commit comments

Comments
 (0)