From 3764594fcc2a80bbeb47fc8f0d4a96e45dca3317 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Thu, 29 Aug 2024 12:38:42 +0300 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..023d8b07c 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 +}