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

NAS-133245 / 25.04 / Switch to using syslog for middleware logfiles #15264

Merged
merged 3 commits into from
Dec 24, 2024

Conversation

anodos325
Copy link
Contributor

This commit converts middleware to using syslog handler + syslog ident in order to uniquely filter log messages into separate files.

This has advantage of streamlining remote syslog handling.

Adding new logger destinations is also fairly straightforward.

  1. Add new TNLog object with details for new log file
  2. Add to tuple of all TNLog objects

These are evaluated during syslog-ng configuration.

If for some reason syslog is broken on the server then middleware will queue the records internally for when syslog becomes unbroken while writing the records to a fallback file for evaluation by a system administrator.

@anodos325 anodos325 added the jira label Dec 23, 2024
@anodos325 anodos325 requested a review from yocalebo December 23, 2024 20:20
@bugclerk
Copy link
Contributor

@bugclerk bugclerk changed the title Switch to using syslog for middleware logfiles NAS-133245 / 25.04 / Switch to using syslog for middleware logfiles Dec 23, 2024
@anodos325 anodos325 force-pushed the syslog-middleware branch 2 times, most recently from 3ccc3fd to 55d285e Compare December 23, 2024 22:08
Copy link
Contributor

@yocalebo yocalebo left a comment

Choose a reason for hiding this comment

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

Fantastic

This commit converts middleware  to using syslog handler + syslog
ident in order to uniquely filter log messages into separate files.

This has advantage of streamlining remote syslog handling.

Adding new logger destinations is also fairly straightforward.
1. Add new TNLog object with details for new log file
2. Add to tuple of all TNLog objects

These are evaluated during syslog-ng configuration.

If for some reason syslog is broken on the server then middleware
will queue the records internally for when syslog becomes unbroken
while writing the records to a fallback file for evaluation by
a system administrator.
@anodos325 anodos325 merged commit 07ef975 into master Dec 24, 2024
2 checks passed
@anodos325 anodos325 deleted the syslog-middleware branch December 24, 2024 15:02
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Dec 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants