# /etc/rsyslog.d/にtemplate.confを作成
touch /etc/rsyslog.d/template.conf
chmod 644 /etc/rsyslog.d/template.conf
# 以下を書き込み
$template template, "%timegenerated:::date-year%/%timegenerated:::date-month%/%timegenerated:::date-day% %timegenerated:::date-hour%:%timegenerated:::date-minute%:%timegenerated:::date-second% %HOSTNAME% %syslogtag% %msg%\n"
# 日付をyyyy/MM/ddの形で表示
# rsyslog.confの編集(以下は編集結果)
# diff /etc/rsyslog.conf_org /etc/rsyslog.conf
87c87
< mail,news.none -/var/log/messages
---
> mail,news.none -/var/log/messages;template
# プロセス再起動
systemctl restart rsyslog
systemctl status rsyslog