Browsing error logs on a remote node

Wednesday, 18th May, 2011

First, set up your sasl

This config sets up a directory for rolling logs (max ten files, each max 10 megabytes). More configs on the man page.

% erl_config.config
 {sasl, [
         {sasl_error_logger, false},
         {error_logger_mf_dir, "/path/to/a/dir/for/erl/logs/"},
         {error_logger_mf_maxbytes, 10485760},  % 10 MB
         {error_logger_mf_maxfiles, 10}

And when you run erlang, tell it where your config file is:

erl -config /path/to/erl_config -boot start_sasl  ... more args ...


  • erlang expects the config file to have the extension .config, which you don’t give in the command line.
  • the above config is cribbed from Programming Erlang. I was surprised to find that Erlang and OTP in Action does not describe how to configure the sasl error logger.

Connect and browse

Once you’re connected to the above node (see Connecting erlang nodes), you can run rb, the report browser. A little bit of set up is required. See this discussion on stackoverflow, which encapsulates the setup in a function:

%% @doc Start the report browser and reset its group-leader. 
%% For use in a remote shell
start_remote_rb() ->
    {ok, Pid} = rb:start(),
    true = erlang:group_leader(erlang:group_leader(), Pid),

2 Responses to “Browsing error logs on a remote node”

  1. Thanks for pointing this out. If there’s ever a second edition of Erlang and OTP in Action, we’ll try to make sure configuration of SASL is described.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: