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

syslog: local syslog and stdout redirection #344

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

jkellerer
Copy link
Collaborator

In relation to #343, this PR adds local syslog server and command output redirection into syslog.

Motivation: Currently I redirect systemd output to syslog (including all stdout/err from resticprofile). This PR allows to have the same support using the built-in syslog client, which has the advantage of more consistent timestamps (not duplicated in stdout formatted log).

The following additional log URLs are added:

  • syslog: (local syslog server via unix socket)
  • syslog://hostname (udp on default port 514)
  • syslog://hostname:514 (udp on port 514)
  • syslog-tcp://hostname (tcp on default port 514)
  • syslog-tcp://hostname:514 (tcp on port 514)

@jkellerer
Copy link
Collaborator Author

@creativeprojects , do you have any concerns with this. It does change previous behaviour in that it now sends command output by default (though #343 allows to control it).

On the other hand the previous version was a bit inconsistent since we sent it to log files but not to syslog.

@creativeprojects
Copy link
Owner

Yeah I'm fine with it 👍🏻
Thanks for the PR 😉

@jkellerer jkellerer force-pushed the enh/syslog branch 4 times, most recently from 1b19273 to 8c12867 Compare March 17, 2024 15:33
Copy link

codecov bot commented Mar 17, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 70.91%. Comparing base (2a7d5fc) to head (8c12867).

Files Patch % Lines
wrapper.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #344      +/-   ##
==========================================
+ Coverage   70.90%   70.91%   +0.01%     
==========================================
  Files         121      121              
  Lines       12299    12304       +5     
==========================================
+ Hits         8720     8725       +5     
  Misses       3185     3185              
  Partials      394      394              
Flag Coverage Δ
unittests 70.91% <84.62%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jkellerer jkellerer added this to the v0.27.0 milestone Mar 17, 2024
@jkellerer jkellerer marked this pull request as ready for review March 18, 2024 11:21
@jkellerer
Copy link
Collaborator Author

Marked it ready for a final review, manually tested all options.

Copy link
Owner

@creativeprojects creativeprojects left a comment

Choose a reason for hiding this comment

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

Works fine, and makes more sense than the previous implementation 👍🏻

Thanks 😉

@jkellerer jkellerer merged commit 667180e into creativeprojects:master Mar 19, 2024
7 checks passed
@jkellerer jkellerer deleted the enh/syslog branch March 19, 2024 08:42
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.

None yet

2 participants