I tried to run this command:
$ python flathunt.py >> job.log
[2022/01/16 20:33:49|config.py |INFO ]: Using config /home/adam/flathunter/config.yaml
according to my understanding from How do I save terminal output to a file? the output [2022/01/16 20:33:49|config.py |INFO ]: Using config /home/adam/flathunter/config.yaml
that was caused by flathunt.py
script should have not been printed on the screen but stored in the job.log
file. However, the opposite is true, the job.log
is empty. What am I missing here?
2>>
...? – FedKad Jan 16 '22 at 19:43self.__log__.info
https://github.com/flathunters/flathunter/blob/main/flathunter/config.py#L26 - so this does not answer my question, right? – Adam Jan 16 '22 at 21:40help(logger)
it looks like the logger object's default handler writes to the error stream regardless of the message level ("If stream is not specified, sys.stderr is used.") – steeldriver Jan 16 '22 at 22:33