Macos – How to disable/ set logging level /preferences PER Mac OS X application

aslconsolelaunchdmacossyslogd

I find my Mac's syslogd "Cosole" logs become unusable when some badly written app (PathFinder.app in this case) incessantly spews into syslogd all day long.. I read somewhere that you could disable logging PER app by..

  1. Creating an alias to the executable bundle inside the App "package", and then ONLY launching that alias FROM the terminal. The process was… Browse to /Applications/ObnoxiousLogger.app, right click, "Show Package Contents", and then Browse to…

    /Applications/ObnoxiousLogger.app/Contents/MacOS/ObnoxiousLogger

    Then you make the alias through the GUI and remember to always launch the app from that alias, again ONLY via the terminal.

    This is annoying, as you HAVE to create the alias via the Finder (symlinking doesn't work, and there is no way to create an alias via the terminal). And if it gets launched ANY other way, youre back to square one, logorrhea.. This method DID work, but for a very short amount of time.

  2. It would seem you could set this via a launchctl command, or a plist variable, but this isn't an app that is opened by launchd, and launchd's documentation is so all-over the place, but I guess this is a possibility, I suppose.

  3. I saw something about sending the log to /dev/null, but it wasn't clear if this was some kind of syslogd pipe, or command, or an /etc/syslogd.conf setting, or what…

Please let me know if you have a surefire way to selectively silence logging per application, or even better, increase or decrease the logging verbosity, per process / command, etc in Mac OS X.

Best Answer

You may want to look at asl.conf(5) which allows you to ignore/process log messages on quite a fine-grained level.

Something like:

? [= Sender ObnoxiousLogger] ignore

should do the trick. If you still want to see the more serious messages from the obnoxious sender, something along the lines of:

? [= Sender ObnoxiousLogger] [> Level error] ignore

might be more appropriate.

Note: after editing /etc/asl.conf, don't forget to kill -HUP your syslogd.

Related Question