fix: redirect to stderr for machine output
All checks were successful
continuous-integration/drone/push Build is passing

See #477
This commit is contained in:
decentral1se 2025-01-09 12:08:42 +01:00 committed by decentral1se
parent 41e514ae9a
commit cb3f46b46e

View File

@ -51,6 +51,10 @@ func Run(version, commit string) {
log.Logger.SetStyles(charmLog.DefaultStyles())
charmLog.SetDefault(log.Logger)
if internal.MachineReadable {
log.SetOutput(os.Stderr)
}
if internal.Debug {
log.SetLevel(log.DebugLevel)
log.SetOutput(os.Stderr)