[erlang-questions] SASL won't write to my error_logs file

Ryan Zezeski rzezeski@REDACTED
Wed Dec 15 05:06:44 CET 2010


On Mon, Dec 13, 2010 at 7:13 PM, Steve Payne <steven.payne@REDACTED>wrote:

> Hi I am having trouble with SASL.  I have tried everything to get the
> error logger to work but it still won't write to my error_logs file.
> Here is what I have:
>
>
> elog3.config
>
> %% rotating log and minimal tty
> [{sasl, [
> {sasl_error_logger, false},
> %% define the parameters of the rotating log
> %% the log file directory
> {error_logger_mf_dir, "/home/steve/error_logs"},
> %% bytes per logfile
> {error_logger_mf_maxbytes, 10485760}, % 10 MB
> %% maximum number of logfiles
> {error_logger_mf_maxfiles, 10}
> ]}].
>
> Home directory:
> elog3.config
> error_logs
>
> Then in the shell
>
> steve@REDACTED:~$ erl -boot start_sasl -config elog3
> Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:3:3] [rq:3]
> [async-threads:0] [hipe] [kernel-poll:false]
>
> Eshell V5.7.4  (abort with ^G)
> 1> error_logger:error_msg("This is an error\n").
>
> =ERROR REPORT==== 11-Dec-2010::20:24:53 ===
> This is an error
> ok
>
> Then when I check the error_logs file there is nothing in it.  Why?  Am
> I missing something?
>




I can't tell if you mean to say that 1) there are no files under the
error_logs dir or that 2) you see a file but it is empty.

 1) Make sure your path is correct.  Check the output of
sys:get_status(error_logger).  You should see log_mf_h under the installed
handlers.

2) There should be two files: 1 and index.  These files are in binary (at
least, 1 should be).  In order to read them you use the report browser tool
(rb).

-Ryan


More information about the erlang-questions mailing list