Skip to content

Comply with the log level setting when logging the current WireGuard …#30

Merged
bigmoby merged 1 commit intobigmoby:mainfrom
jlehtine:jlehtine/status-log-level-compliance
Aug 8, 2023
Merged

Comply with the log level setting when logging the current WireGuard …#30
bigmoby merged 1 commit intobigmoby:mainfrom
jlehtine:jlehtine/status-log-level-compliance

Conversation

@jlehtine
Copy link
Copy Markdown
Contributor

@jlehtine jlehtine commented Aug 8, 2023

This proposed change has been tested by running the modified script manually inside the add-on container but not via the build chain or service infrastructure.

Proposed Changes

Make status logging comply with the configured log level by logging WireGuard status details (i.e. wg show output) only when the configured log level is INFO or higher (matching the existing log level of the leading message). Does not change the default behavior.

Rationale: While minimizing disk wear and tracking unnecessary IO I noticed that the WireGuard client add-on keeps writing the current status to logs every 30s even when configured to log only warnings or errors.

Copy link
Copy Markdown
Owner

@bigmoby bigmoby left a comment

Choose a reason for hiding this comment

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

Thanks, well done 👍

@bigmoby bigmoby merged commit e655f99 into bigmoby:main Aug 8, 2023
@bigmoby
Copy link
Copy Markdown
Owner

bigmoby commented Aug 8, 2023

Thank you @jlehtine for your contribution 🙌

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