-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Syslog wrapper #201
base: master
Are you sure you want to change the base?
feat: Syslog wrapper #201
Conversation
ccc4a3b
to
5ce43fe
Compare
return syslog_header + message | ||
|
||
|
||
def get_syslog_handler(address: str) -> SysLogHandler: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def get_syslog_handler(address: str) -> SysLogHandler: | |
def get_syslog_handler(address: str | None) -> SysLogHandler: |
metricq/cli/wrapper.py
Outdated
if value is not None: | ||
logger = get_logger() | ||
|
||
program_name: str = "metricq_program" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metricq_program
is worse than the actual default, which is the process name.
metricq/cli/wrapper.py
Outdated
|
||
return option( | ||
"--syslog", | ||
help="Enable syslog logging by specifying the syslog path or URL for the logger.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intended format is not a URL. A URL contains a scheme, but a hostname-port tuple does not. The path is a UNIX domain socket.
4a81244
to
8168afe
Compare
8168afe
to
7eb526a
Compare
Introducing the @metricq_syslog() wrapper for click commands, that configures the logger to sent to a Syslog Location (local or remote)