| 知乎专栏 |
freeswitch 有多处日志配置,比较分散
[root@testing freeswitch]# grep loglevel vars.xml <X-PRE-PROCESS cmd="set" data="console_loglevel=err"/>
logfile.conf.xml
[root@netkiller ~]# cat /etc/freeswitch/autoload_configs/logfile.conf.xml
<configuration name="logfile.conf" description="File Logging">
<settings>
<!-- true to auto rotate on HUP, false to open/close -->
<param name="rotate-on-hup" value="true"/>
</settings>
<profiles>
<profile name="default">
<settings>
<!-- File to log to -->
<!--<param name="logfile" value="/var/log/freeswitch.log"/>-->
<!-- At this length in bytes rotate the log file (0 for never) -->
<param name="rollover" value="1048576000"/>
<!-- Maximum number of log files to keep before wrapping -->
<!-- If this parameter is enabled, the log filenames will not include a date stamp -->
<param name="maximum-rotate" value="32"/>
<!-- Prefix all log lines by the session's uuid -->
<param name="uuid" value="true" />
</settings>
<mappings>
<!--
name can be a file name, function name or 'all'
value is one or more of debug,info,notice,warning,err,crit,alert,all
Please see comments in console.conf.xml for more information
-->
<map name="all" value="console,debug,info,notice,warning,err,crit,alert"/>
</mappings>
</profile>
</profiles>
</configuration>
出现大量登录日志,没几天磁盘满了
2026-02-23 04:35:28.264784 95.50% [WARNING] sofia_reg.c:3210 Can't find user [44@pbx.netkiller.cn] from 103.195.101.98 You must define a domain called 'pbx.netkiller.cn' in your directory and add a user with the id="44" attribute
配置下面日志级别禁止输出日志
[root@testing freeswitch]# grep log autoload_configs/sofia.conf.xml
<param name="log-level" value="4"/>