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

Improve logging for canBackup check #1328

Merged
merged 4 commits into from
Oct 7, 2022
Merged

Improve logging for canBackup check #1328

merged 4 commits into from
Oct 7, 2022

Conversation

emtiu
Copy link
Member

@emtiu emtiu commented Oct 7, 2022

Fixes one half of #1142, closes #1143.

@emtiu emtiu merged commit da358a2 into bit-team:master Oct 7, 2022
@emtiu emtiu deleted the emtiu-canbackup-logging branch October 7, 2022 23:28
@@ -677,6 +677,7 @@ def backup(self, force = False):
gettext.ngettext('Waiting %s second.', 'Waiting %s seconds.', 30) % 30,
30)
for counter in range(30, 0, -1):
logger.info("Cannot start snapshot yet: target directory not accessible. Waiting 1s.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just like to point out that since backintime by default logs at INFO this is potentially 30 non-informative log lines in syslog. A more sensible approach would be to either 1. not log this or 2. if logging this is crucial (I don't believe it is since the failure that can happen is logged below) then count how many times the iteration has happened and only log if it is greater than 1.

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

Successfully merging this pull request may close these issues.

2 participants