Closed janpascal closed 4 years ago
quiet suppresses output on stdout not on stderr
So if you want to pipe the result instead of using the output file, you must not use quiet as then you get nothing to pipe!
I'm sorry, but I'm quite sure as this has worked for years. I've just tried again just to be absolutely sure:
venv/bin/tv_grab_nl3.py --quiet > stdout.txt 2>stderr.txt &
gives the status messages on stderr as above, and the xml data on stdout.
The function Logging.writelog (in tv_grab_IO.py) checks the quiet flag and should prevent writing to stderr when it is set. Except that it doesn't for these few lines. I'll try to check why :).
You're right. It's been a long time since I looked at that part, while in between I worked other code. My guess is that there is a problem with your log-file as then message meant for the log-file are send to stderr. In that stderr output you then should see something about the log-file.
I'm running tv_grab_nl3.py in a cron job. stdout is piped via a socket to tvheadend, but every time the job runs I get an email from cron with text like
It looks like this is the stderr output from tv_grab_nl3.py, which it outputs even though the --quiet flag is used. I think this output should be suppressed with the --quiet flag.