Skip to content

Avoid confusing error message in debug mode#426

Merged
cgzones merged 1 commit intologrotate:masterfrom
cgzones:log
Nov 2, 2021
Merged

Avoid confusing error message in debug mode#426
cgzones merged 1 commit intologrotate:masterfrom
cgzones:log

Conversation

@cgzones
Copy link
Member

@cgzones cgzones commented Oct 13, 2021

In debug mode the state file is not created if not already existent in
lockState(). Do not print the message

error: error opening state file /var/lib/logrotate.status: No such file or directory

while trying to read the state file, since in debug mode this is not an
error.

Related: #425

Copy link
Member

@kdudka kdudka left a comment

Choose a reason for hiding this comment

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

Looks good, one coding style suggestion inline.

In debug mode the state file is not created if not already existent in
lockState().  Do not print the message

    error: error opening state file /var/lib/logrotate.status: No such file or directory

while trying to read the state file, since in debug mode this is not an
error.

Related: logrotate#425
@cgzones cgzones merged commit 1a59b68 into logrotate:master Nov 2, 2021
@cgzones cgzones deleted the log branch November 2, 2021 18:50
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