2008年1月22日火曜日

TigerとLeopardでsyslog

標準だとルータのsyslogとかはひょうじできないので
/System/Library/LaunchDaemons/com.apple.syslogd.plistを修正して対応。


Tigerの場合
以下の箇所を変更します。


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.apple.syslogd</string>
<key>ServiceDescription</key>
<string>Apple System Log Daemon</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/syslogd</string>
<string>-u</string>←追加する
</array>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>



Leopardの場合


<!--
Un-comment the following lines to enable the network syslog protocol listener.
-->
<!--←コメントをとる
<key>NetworkListener</key>
<dict>
<key>SockServiceName</key>
<string>syslog</string>
<key>SockType</key>
<string>dgram</string>
</dict>
-->←コメントをとる
</dict>



あとはアンロードしてロードする。


sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist

0 件のコメント: