creativeprojects / resticprofile

Configuration profiles manager and scheduler for restic backup
https://creativeprojects.github.io/resticprofile/
GNU General Public License v3.0
604 stars 29 forks source link

syslog: local syslog and stdout redirection #344

Closed jkellerer closed 4 months ago

jkellerer commented 4 months ago

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:

jkellerer commented 4 months ago

@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 commented 4 months ago

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

codecov[bot] commented 4 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/creativeprojects/resticprofile/pull/344/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fred) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/creativeprojects/resticprofile/pull/344/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fred) | `70.91% <84.62%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Fred#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jkellerer commented 4 months ago

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