Fix rsyslog config to capture logs across distros

Add three conditions to properly capture CGRateS logs:

- programname startswith 'cgr-engine': catches logs from external
  libraries that don't use our syslogger (e.g. diameter conn errors)
- programname startswith 'CGRateS': handles deb-based distros
  where our syslog tag becomes the program name
- msg contains 'CGRateS': handles rpm-based distros where systemd
  journal overrides programname but our tag remains in message content
This commit is contained in:
ionutboangiu
2025-05-23 20:11:05 +03:00
committed by Dan Christian Bogos
parent 5361a3f6a1
commit 7069ed1cd8

View File

@@ -1,4 +1,4 @@
if ($programname startswith 'cgr-engine' or $programname startswith 'CGRateS') then {
if ($programname startswith 'cgr-engine' or $programname startswith 'CGRateS' or $msg contains 'CGRateS') then {
action(type="omfile" File="/var/log/cgrates/CGRateS.log")
stop
}
}