10.7: Re-enable syslogd for incoming connections

Aug 03, '11 07:30:00AM

Contributed by: poenn

I like to have all my logs in one place, so I was using syslogd's network listening on my 10.6 Server to let my router send its logs to it. After updating to 10.7 the plist was reverted to its default state, preventing what I was used to. This hint explains what to do, to get it working again.

First make a backup of the plist, then do the following:

Convert it to XML so it's editable:

sudo plutil -convert xml1 /System/Library/LaunchDaemons/com.apple.syslogd.plist

Edit the file; I used pico with this command (you can also use TextWrangler, etc.):

sudo pico /System/Library/LaunchDaemons/com.apple.syslogd.plist

You need to insert this key:

<key>NetworkListener</key>
 <dict>
        <key>SockServiceName</key>
        <string>syslog</string>
        <key>SockType</key>
        <string>dgram</string>
 </dict>
Convert the plist back to binary format: 2br sudo plutil -convert binary1 /System/Library/LaunchDaemons/com.apple.syslogd.plist

Unload and reload syslogd:

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


Afterwards check Console.app for incoming logs from your router, etc.

[crarko adds: I haven't tested this one.]

Comments (11)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20110724103552640