/etc/syslog.confを確認
現在のsyslog.confを確認.
$ cat /etc/syslog.conf🆑 # Note that flat file logs are now configured in /etc/asl.conf install.* @127.0.0.1:32376 # used for the adaptive firewall: man emlog.pl auth.* @127.0.0.1:60762
cron.logに関する記述がない.
syslog.confを編集
編集前にバックアップ.
$ sudo cp -p /etc/syslog.conf /etc/syslog.conf.v00🆑 Password:🆑 $ ls -la /etc/syslog.conf*🆑 -rw-r--r-- 1 root wheel 200 2 4 2018 /etc/syslog.conf -rw-r--r-- 1 root wheel 200 2 4 2018 /etc/syslog.conf.v00🈁 -rw-r--r-- 1 root wheel 96 2 26 2016 /etc/syslog.conf~previous
編集後の内容を確認.
$ cat /etc/syslog.conf🆑 # Note that flat file logs are now configured in /etc/asl.conf install.* @127.0.0.1:32376 # used for the adaptive firewall: man emlog.pl auth.* @127.0.0.1:60762 #cron log🈁 cron.* /var/log/cron.log🈁
差分を確認.
$ diff /etc/syslog.conf.v00 /etc/syslog.conf🆑 6a7,8 > #cron log > cron.* /var/log/cron.log $
反映させる
syslogdを再起動して設定内容を反映させる.
$ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist🆑 /System/Library/LaunchDaemons/com.apple.syslogd.plist: Operation not permitted while System Integrity Protection is engaged🈁 $
今回はmacos 10.3のHigh Sierraで試したが,El Capitan(10.11)以降に搭載された,System Integrity Protectionが効いてしまって,残念ながら反映できない.
本来なら,次のようなコマンドでsyslogdを再起動できる.(今回はメモ)
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
Counter: 4827,
today: 3,
yesterday: 0
最終更新: 2019-06-02 (日) 19:02:23 (JST) (1752d) by nobuaki