Add trunc_io.erl v 1.11 from Matthias Lang

http://www.corelatus.com/~matthias/trunc_io.erl
1 file changed
tree: fbf9e0cd2398c26383110d80f92fb940925e9eea
  1. src/
  2. .gitignore
  3. README.md
  4. rebar
README.md

Twig is a SASL-compliant Erlang/OTP logger. It installs a gen_event handler in the error_logger event manager, where it consumes standard OTP reports and messages as well as events generated by twig:log/2,3,4. Log messages are written to a syslog server over UDP using the format specified in RFC 5424.

Twig's behavior is controlled using the application environment:

  • host (undefined): the hostname of the syslog server
  • port (514): the port of the syslog server
  • facility (local2): syslog facility to be used
  • level (info): logging threshold. Messages “above” this threshold (in syslog parlance) will be discarded. Acceptable values are debug, info, notice, warn, err, crit, alert, and emerg.
  • appid (“twig”): inserted as the APPID in the syslog message