[erlang-questions] Configuring sasl to write rb-compatible logs
Gleb Peregud
gleber.p@REDACTED
Thu Mar 31 20:40:31 CEST 2011
Hi
I'm digging into using rb for log viewing. As far as I understood from
documentation, some blogs and other emails here it is enough to define
the following parameters in the sasl application's config:
error_logger_mf_dir
error_logger_mf_maxbytes
error_logger_mf_max_files
Here's an output of my test:
============================================
gleber@REDACTED:~/tmp/test$ ls
rb.config test.sh
gleber@REDACTED:~/tmp/test$ cat rb.config
[
{sasl, [
{error_logger_mf_dir, "."},
{error_logger_mf_maxbytes, 1024},
{error_logger_mf_max_files, 10}
]
}
].
gleber@REDACTED:~/tmp/test$ cat test.sh
#!/bin/sh
exec erl -sname test \
-config rb \
-boot start_sasl
gleber@REDACTED:~/tmp/test$ ./test.sh
Erlang R14A (erts-5.8) [source] [smp:2:2] [rq:2] [async-threads:0]
[kernel-poll:false]
=PROGRESS REPORT==== 31-Mar-2011::20:36:09 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.41.0>},
{name,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 31-Mar-2011::20:36:09 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.42.0>},
{name,overload},
{mfargs,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 31-Mar-2011::20:36:09 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.40.0>},
{name,sasl_safe_sup},
{mfargs,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 31-Mar-2011::20:36:09 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.43.0>},
{name,release_handler},
{mfargs,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 31-Mar-2011::20:36:09 ===
application: sasl
started_at: test@REDACTED
Eshell V5.8 (abort with ^G)
(test@REDACTED)1> rb:start().
{error,{"cannot read the index file",
{child,undefined,rb_server,
{rb,start_link,[[]]},
temporary,brutal_kill,worker,
[rb]}}}
(test@REDACTED)2>
=CRASH REPORT==== 31-Mar-2011::20:36:11 ===
crasher:
initial call: rb:init/1
pid: <0.49.0>
registered_name: []
exception exit: "cannot read the index file"
in function gen_server:init_it/6
ancestors: [sasl_sup,<0.38.0>]
messages: []
links: [<0.39.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 233
stack_size: 24
reductions: 266
neighbours:
(test@REDACTED)2> q().
ok
(test@REDACTED)3>
gleber@REDACTED:~/tmp/test$ ls
rb.config test.sh
============================================
Am I missing something in the configuration of sasl or is there
anything else I have to do to make sasl attach error_logger_mf_h to
error logger?
Best,
Gleb Peregud
More information about the erlang-questions
mailing list