opensips日志配置

1.openips默认启动事务日志汇在var/log/message,此处我们修改默认日志路径

2默认配置是:log_facility=LOG_LOCAL0

故而我们需要在 vim  /etc/rsyslog.conf增加红色标注的行

local0.*   /opt/opensips/logs/opensips.log

重启rsyslog 服务: 只有opensips.cfg 中的debug_mode=no及log_stderror=no,日志才会写入:

systemctl start rsyslog 
 
 
注:opensips日志记录需要配合系统的logrotate和cron,所以我们首先检查下系统是否安装和开启目标服务,当然了,你也可以不需要。默认一个文件就行。
没有安装,毫不犹豫执行:yum install logrotate cron
安装了:查看是否启动:service crond status
 没有启动:service crond start #启动服务

 

posted @ 2019-07-26 15:10  启程华夏  阅读(1596)  评论(0编辑  收藏  举报