gauteh/lieer

verbose logging option to show same info as dry-run

digitalsignalperson opened this issue · 2 comments

Hey, I've been playing with lieer and it's been going great.

In my testing I've really liked being able to to see the changes with the --dry-run setting for push and pull to preview what you expect to hapen.

I think it would make a lot of sense too to show that same information in a real push/pull to log what actually happened. Plus that info might make for a nice local history log of sorts.

One implementation could be for every print statement currently with "(dry-run)", print it at all times, but only add the "(dry-run)" part if it's a dry run. I might just hack something like this for the short term

Or this could be controlled with a new config option and/or commandline switch for verbose output.

I don't know if there's any other better ideas, like a config option to specify a log file that will just append all this stuff to a log automatically, and omitting the tqdm bars etc.

gauteh commented

Hi, yeah, that would be nice. I think I am in favor of a command-line switch. Can't remember if it is currently possible to disable the bar, but maybe something that uses https://github.com/gauteh/lieer/blob/master/lieer/nobar.py with no output.

added a PR for this #245

For the progress bar --no-progress on it's own replaces tqdm with a .nobar/tqdm, but --no-progress --quiet removes that for the most logging friendly output. But then it misses stats on how long it took, but that can at least be added by an external script that is doing the logging & redirecting.

Better than redirecting stdout to a log file and stuff would be having logging set up in the config file so that all manual push/pull history operations can get automatically logged. That's a bit more work tho.