From 262c1bd981c369dd881b71e2ed172911cdffc03a Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Thu, 15 Jun 2023 06:36:04 -0400 Subject: [PATCH] Revise logging .conf files --- data/conf/logging/logrotate.conf | 2 +- data/conf/logging/rsyslog.conf | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/data/conf/logging/logrotate.conf b/data/conf/logging/logrotate.conf index 10f15331f..dd59e3dd8 100644 --- a/data/conf/logging/logrotate.conf +++ b/data/conf/logging/logrotate.conf @@ -8,6 +8,6 @@ sharedscripts su root adm postrotate - /usr/lib/rsyslog/rsyslog-rotate + /usr/lib/rsyslog/rsyslog-rotate endscript } diff --git a/data/conf/logging/rsyslog.conf b/data/conf/logging/rsyslog.conf index efa7b543c..dcc15a5cf 100644 --- a/data/conf/logging/rsyslog.conf +++ b/data/conf/logging/rsyslog.conf @@ -1,2 +1,4 @@ -if $programname contains "cgr-engine" or $programname contains "CGRateS" then /var/log/cgrates/CGRateS.log -& stop +if ($programname startswith 'cgr-engine' or $msg contains 'CGRateS') then { + action(type="omfile" File="/var/log/cgrates/CGRateS.log") + stop +} \ No newline at end of file