Erlang: Log to Files

http://journal.dedasys.com/2010/05/24/erlang-log-to-files

Erlang: Log to Files

Posted by  David N. Welton  on Monday, May 24, 2010

Since I had a heck of a time finding out how to do something that ought to be really easy, I thought I'd post what I found.  If you want Erlang to write errors to a file instead of stdout, add this to the command line:

-kernel error_logger '{file, "/tmp/erl.log"}'

Maybe there's a better solution, in which case feel free to correct me.

今天用了一下sasl_error_loger  发现日志信息无法写到日志文件里面只好用下面方式替换掉 sasl

改后

  1 [{kernel, [

  5      {error_logger, {file, "/home/jason/learn/erlang/log.log"}}             

  6     ]}].

原来:  

[{sasl, [

%% All reports go to this file

{sasl_error_logger, {file, "/home/joe/error_logs/THELOG" }}

]}].



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值