Change the log printing strategy in console command

This commit is contained in:
M. Mert Yildiran 2023-03-05 21:08:44 +03:00
parent 08b96c2663
commit ca35177b44
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461

View File

@ -79,8 +79,10 @@ func runConsole() {
msg := string(message)
if strings.Contains(msg, ":ERROR]") {
msg = fmt.Sprintf(utils.Red, msg)
fmt.Fprintln(os.Stderr, msg)
} else {
fmt.Fprintln(os.Stdout, msg)
}
log.Info().Msg(msg)
}
}()