mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
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
5 lines
186 B
Plaintext
5 lines
186 B
Plaintext
if ($programname startswith 'cgr-engine' or $programname startswith 'CGRateS' or $msg contains 'CGRateS') then {
|
|
action(type="omfile" File="/var/log/cgrates/CGRateS.log")
|
|
stop
|
|
}
|