现在我的rsyslog.conf文件中有这个。
/* GLOBAL DIRECTIVES */
# Global umask for all actions
$umask 0022
# Set the default permissions for all log files.
module(load="buildin:omfile"
# To enable high precision timestamps, use the following line:
# template="RSYSLOG_FileFormat"
template="RSYSLOG_TraditionalFileFormat"
# Set the default permissions for all log files.
dirCreateMode="0700"
dirOwner="syslog"
dirGroup="adm"
fileCreateMode="0640"
fileOwner="syslog"
fileGroup="adm"
)
$PrivDropToUser syslog
$PrivDropToGroup syslog
global(workDirectory="/var/spool/rsyslog")
/* INCLUDED FILES */
# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf
Run Code Online (Sandbox Code Playgroud)
这似乎是rsyslog根据v8-stable 文档配置的“最新”稳定方式
但这仍然使用旧类型的指令,例如$IncludeConfig不应该是这样吗 …
rsyslog ×1