Replies: 1 comment 2 replies
-
I'll start with some points:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Thanks for a great tool! I just started to use it and almost ready to switch from restic+rusticprofile to rustic even though it doesn't support all the features I use.
I have several things to discuss about logging, idk, are there bugs or features and also have questions about current decisions.
Rustic doesn't fully log summary:
rustic/src/commands/backup.rs
Lines 239 to 240 in 73d6b20
For me it seems like a bug, because I use this info from restic log in additional scripts. Is there reasons for print-only some info?
It's expected that "Log output should be either stderr or file" as said in overwork logging and log levels #209. But now if user enables
log-level="debug"
+log-file="some"
, there are both stderr output and file write, so he has torustic … 2> /dev/nul
Added/modified items are only visible with
debug
log level and not visible with defaultinfo
. This info seems valuable for me to show oninfo
log level as restic does (and alsorsync
, btw). As for "unchanged" items, there is also an idea behind restic solution to show them by default. This gives a complete filelist of the current snapshot. Personally I filter out "unchanged" items from my logs, but in some use cases it seems valuable.Logs contains too much noise. I don't think timestamp on every line is useful on levels above
debug
. It's enough to timestamp start/end + maybe some important phases.Also new items prepended with
[DEBUG] (1) rustic_core::archiver::tree_archiver:
, which is consequence of p.3., and will auto-fix if move files output toinfo
level.Logging ignored items is a great decision for debug, thank you! It's right there it should.
Is there some logic behind current log levels? Are they final or just a draft?
Possible solution for pp.3-4 is a custom log format so user can configure what he want to see. But maybe it's too complex for now.
It seems useful to me to still print some info even if
log-file
was set (in addition to p.2.), but allow--quiet
mode to disable this. E.g. I loginfo
level to file but still can see warnings+progress+summary onscreen. Not sure is it a good idea, it's better to check best practices.I keep some logs for a while to be able to analyze them later. Logs rotation seems not the right thing to add. But there are simpler solutions:
run-after
script as described in Per source hooks in the config file #902 (comment), which filters and renames log to proper name.log-file
, likelog-file = "/path/backup-%PROFILE-%Y-%m-%d_%H-%M-%S.log"
(post-*-command
already support substitution). This seems most simple for end user and keeps config clear.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions