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