title: Best overall option for Erlang audit logging
body: <p>I have a fairly mature application that, in general performs quite well. One area we have been running into issues is surrounding our audit logging. Currently we are using a custom gen server that just logs to a file via io:format. Not a huge issue but not the most performant and, more importantly, can flood our disks. These logs are pretty crucial for helping diagnose issues in this system as it generally is just a black-box that rarely needs any intervention. However, when it does have in issue, 99% of the time it is not something the sasl logs will catch. So, unfortunately, we can't just do away with them.</p>
  
  <p>So, my question is around what the generally accepted best practices in erlang might be or if there are such "best" practices? My criteria are as follows:</p>
  
  <ul>
  <li>established framework either native to the Erlang/OTB libraries or well-supported by the community (e.g. disk_logger, lager, etc.)</li>
  <li>non-blocking, asychronous i/o</li>
  <li>reasonably easy to implement (I'm not a newbie but there are other, higher-priority issues I'd like to be working on than swapping-out a log implementation.)</li>
  <li>I'm open to file loggers or simply writing to a db somewhere.</li>
  </ul>