Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework verbose behavior, and how it interacts with log levels #194

Open
elboulangero opened this issue Feb 26, 2019 · 0 comments
Open

Rework verbose behavior, and how it interacts with log levels #194

elboulangero opened this issue Feb 26, 2019 · 0 comments

Comments

@elboulangero
Copy link
Contributor

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:

  1. 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.
  2. Add a new --statistics switch (-s) that only shows the statistics at the end. -v would imply -s, but not vice versa.
  3. 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant