Add ability for Vector to log to syslog directly #19657
Labels
domain: observability
Anything related to monitoring/observing Vector
type: feature
A value-adding code addition that introduce new functionality.
A note for the community
Use Cases
When vector is installed as a systemd service (on Ubuntu and Debian at least), its logs are fed into journald, and when you view the logs via
journalctl -u vector
, they are all at INFO severity, hence no colorization. Even if vector reports errors/warnings (and ERROR/WARNING word is in the log text), the syslog severity is still INFO. In fact, I use vector to take system logs and send them to Loki+Grafana, and all vector logs are shown as INFO there as well (because I process syslog severity into grafana loglevel).Attempted Solutions
I tried to find in the documentation on configuring vector a way to specify what logging method to use, didn't find anything.
Proposal
It would be nice to have proper syslog severity assigned to log events, to enable journalctl filtering, coloring and related features.
There could be a configuration option to send logs to stdout and color them internally (current behavior seems to do this and enables/disables coloring depending on terminal interactivity or something like that) or to send them to syslog with proper severity and facility. Systemd unit will then set this configuration (as a commandline switch or ENV var) to syslog, while default will be stdout.
References
No response
Version
tried on 0.30.0, 0.35.0, same behavior
The text was updated successfully, but these errors were encountered: