Rework verbose behavior, and how it interacts with log levels
elboulangero opened this issue · 0 comments
From Lennart, copy pasted verbatim from #191
How "-v" and the log levels interact is a good question. The "-v" option was supposed to be something like tar's "v" switch, i.e. just show some most high-level progress info about what we are processing (i.e. which path we are looking at). I think it would make sense to stick to that, and probably not overload it with anything else.
Right now arg_verbose is also used to show the stats at the end and a couple of other things, which I either should be removed, or also be individually selectable (since I figure running casync without path progress info but with stats should be very useful, the opposite probably not so much...)
So here's my proposal:
- Have "-v" for "path progress info", i.e. the "tar" behaviour, i.e. lines showing us where we currently are in the file system, but nothing else really, except for stats, see below.
- Add a new --statistics switch (-s) that only shows the statistics at the end. -v would imply -s, but not vice versa.
- For everything else there would be the log levels. And I think it would be great if the effect of "-v" and "-s" would only be that some specific log messages get switched between LOG_DEBUG and LOG_INFO. i.e. so that we always generate the same log output, except at different levels. Implementation idea would be to have two log functions log_statistics() and log_progress() or so, which are wrappers for log_full() but use LOG_INFO and LOG_DEBUG depending on arg_statistics and arg_verbose, if you follow what I mean...
Does that make sense?