Logging libraries for Erlang/OTP [closed]

半腔热情 提交于 2019-12-18 12:52:46

问题


For logging activity of an Erlang/OTP application, do you simply use a wrapper over disk_log or some other libraries?


回答1:


I've also found:

  • http://github.com/sinnus/ejabberd_logger
  • http://github.com/etnt/elogger
  • http://github.com/JacobVorreuter/log_roller



回答2:


There is standard error logging application SASL http://www.erlang.org/doc/system_principles/error_logging.html.

It can be configured to save logs on disk.

error_logger:info_report example usage:

2> error_logger:info_report([{tag1,data1},a_term,{tag2,data}]).
=INFO REPORT==== 11-Aug-2005::13:55:09 ===
    tag1: data1
    a_term
    tag2: data
ok
3> error_logger:info_report("Something strange happened").
=INFO REPORT==== 11-Aug-2005::13:55:36 ===
Something strange happened
ok

Also there is log4erl when you need different log format. You can look for real usage of it in erlyvideo project.




回答3:


There is another option named lager from basho.




回答4:


Two libraries I've found: http://code.google.com/p/erlslug/ and http://github.com/ahmednawras/log4erl




回答5:


https://github.com/siberian-fast-food/alogger



来源:https://stackoverflow.com/questions/3718101/logging-libraries-for-erlang-otp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!