Closed
Conversation
All reporters now have a ?facility argument which is passed through to logs_syslog.message.
Logs_syslog.facility is a Syslog_message.facility Logs.Tag.def which is recognised by all the reporters as overriding the ?facility argument provided to the reporter (or the default in Logs_syslog.message). Fixes hannesm#7
Contributor
Author
|
(I originally wrote this atop #5, so I have commits ready to replace the ones which will conflict there) |
Owner
|
thanks, I manually cherry-picked these (and added some commits).. |
This was referenced Aug 15, 2018
hannesm
added a commit
to hannesm/opam-repository
that referenced
this pull request
Oct 27, 2018
CHANGES: - support for syslog-message.1.0.0 it split the `message` field of Syslog_message.t into `tag` and `content` use the name of Logs.src as tag when sending messages - move build system to dune (hannesm/logs-syslog#10 by @dra27) - provide Logs_syslog.facility Logs.Tag.def to specify facility in log message, add ?facility as default facility to all reporters (reported in hannesm/logs-syslog#7, fixed in hannesm/logs-syslog#9 by @dra27) - append ':' to source (reported in hannesm/logs-syslog#6, fixed in hannesm/logs-syslog#8 by @dra27) - add missing dependency on unix for logs-syslog.unix (hannesm/logs-syslog#4 by @dra27)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #7, this adds
?facilityto all the reporters and alsoLogs_syslog.facilitywhich can be used to specify the facility for a specific log message.My test program includes:
I couldn't decide if the function was useful enough to bother adding to the API (you'd obviously need something different if you actually have multiple tags).