Closed mjpieters closed 2 months ago
Thinking about it, all logs should probably be sent to stderr and the same should probably be true for pueued
as well?
Thinking about it, all logs should probably be sent to stderr and the same should probably be true for
pueued
as well?
Hard to say. Generally speaking, 'out of band' information should go to stderr. When I run pueue log <TASKID>
the goal is to get the log output of a task, so that should go to stdout. Anything else should go to stderr.
Ah yep. By logs I meant all of the stuff that's printed when pueue/d
is called with -v/v/v
pueue log
should definitely be put to stdout
The linked MR sends all log output to stderr
and sends an error
log message in case of version incompatibilities.
I'm not sure about the error-level "version incompatiblity" message though. It feels more like a warning, but the default log level is error
. Maybe the default log level for the client should be bumped to warning
?
Yes, that's a warning level message. What other warning-level log output could the client produce? I'd review that and bump the level to warning if there isn't too much else that'd show up.
Describe the bug
When client and daemon versions differ, all output except for JSON output is prepended with
This message is written to stdout, which means it can't easily be filtered out.
Steps to reproduce
Run the daemon as version 3.4.0, then use client version 3.4.1 and use
--print-task-id
to only get the task ID to be output:The expected output would be
1
, withDifferent daemon version detected '3.4.0'. Consider restarting the daemon.
having been redirected to /dev/null.Debug logs (if relevant)
No response
Operating system
Debian 10
Pueue version
3.4.0 (daemon) and 3.4.1 (client)
Additional context
At the very least, the message should be written to stderr. Ideally, it should be possible to disable it altogether (
pueue --no-warnings add ...
).