title: Can I abuse ASL (Apple System Log) for logging only to a log file?
body: <p>It is easy to configure <em>ASL</em> to log messages also to <code>stderr</code> or to log a copy of the message to a log file of my choice (using a log format of my choice), but I wonder if it is possible to "abuse" ASL to only log to such an external file, without passing messages through the standard logging processing (e.g. without having the message being processed by the <code>asl.conf</code> file rules and without having it ending up in the <code>.asl</code> binary files)? That way one could easily make use of the filter and formatting capabilities of <em>ASL</em> when writing application log files, that shall not appear in Console.app or log so much data, that they would flood the standard log files (like system.log).</p>
  
  <hr>
  
  <p>For those who don't know what <em>ASL</em> is, it's Apple's default logging facility for OS X, similar to <em>syslog</em> on other systems (in fact the <em>syslog</em> API has became a slim wrapper around <em>ASL</em>, maintained only for backwards and POSIX compatibility). I haven't found any detailed documentation at Apple's website, there is no extensive guide for using this API, there is only <a href="https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/asl.3.html#//apple_ref/doc/man/3/asl" rel="nofollow">the man page</a> and <a href="http://www.opensource.apple.com/source/Libc/Libc-825.40.1/include/asl.h" rel="nofollow">the header file</a>.</p>