Hi,

 

The log_facility for acc is LOG_DAEMON by default - http://www.kamailio.org/docs/modules/4.3.x/modules/acc.html#acc.p.log_facility

 

I have changed it to LOCAL1:

 

modparam("acc", "log_facility", "LOG_LOCAL1")

 

And have the main logs as LOCAL0:

 

log_facility=LOG_LOCAL0

 

This is then distributed in syslog like this:

 

local0.*        /var/log/kamailio/kamailio.log

local1.*        /var/log/kamailio/accounting.log

 

Obviously you can use the same facility for both, if you want them both in the same log.

 

In essence, I think you just need to change the log_facility of acc.

 

 

Cheers

 

Phil

 

From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Yasin CANER
Sent: 26 January 2016 15:20
To: sr-users@lists.sip-router.org
Subject: [SR-Users] Acc message to syslog

 

Hello;

    Kamailio V4.3 is configured with syslog for loggin. Acc message as below writes to message but not kamailio.log text as specified. Here is debugging and logging configuration. Could you check it please. Why dont write acc message to kamailio.log file?

Thanks ;

inspired by
https://www.kamailio.org/wiki/tutorials/3.2.x/syslog


------------- Kamailio.cfg ----------
debug=2
log_facility=LOG_LOCAL1
------------
Example Log;
---------Message file
/usr/local/sbin/kamailio[19236]: NOTICE: acc [acc.c:317]: acc_log_request(): ACC: transaction answered: timestamp=1453821310;method=BYE;from_tag=as2b83fadd;to_tag=as3f5e63d3;call_id=721060a9089d580a511ba0f37dd......
--------


Centos 6.6
------------ rsyslog.conf --------
#kamailio Logging
local1.*                                                -/var/log/kamailio/kamailio.log
local2.*                                                -/var/log/kamailio/kamailio_direction.log
local3.*                                                -/var/log/kamailio/kamailio_err.log
-------------------



--