bbolli / tumblr-utils

Utilities for dealing with Tumblr blogs, Tumblr backup
GNU General Public License v3.0
667 stars 124 forks source link

Log file #204

Closed indrakaw closed 4 years ago

indrakaw commented 5 years ago

By default errors show on screen. It's possible to redirect output to a file, but it isn't effective. My suggestion is an option to enable progress logging on a file in output directory, eg errors.log or just logs.txt.

cebtenzzre commented 5 years ago

tee is good enough for me, but I suppose this would still be useful. Especially since the current logging uses a lot of \rs to overwrite previous output.

indrakaw commented 5 years ago

Normally I would copy what's on screen then paste it. :p

cebtenzzre commented 4 years ago

Looking back at this, I bet the cause of your issue is that this script writes to both stdout and stderr. To get both status messages and errors, do

python tumblr_backup.py [...other arguments...] >log.txt 2>&1

Note the 2>&1 at the end. That should work on all operating systems.