views:

104

answers:

2

Folks we are now delploying a lot of Erlang instances and we are seeing bugs been thrown and would like to examine them...

Normally we connect to the running instance with a remote shell and get access to an Erlang console that way, but this doesn't work for rb or error messages...

How do I get remote access to my SASL error messages without dropping the server, starting it non-detached and looking at the shell?

+3  A: 

I ran into this back in R11B and ended up creating a clone of rb that works over a remote shell (http://github.com/archaelus/erms/blob/master/src/erms_rb.erl). The trick is to discover the group_leader of the caller and then send output there.

I should probably tidy that up and submit it as a patch to rb.

archaelus
+1  A: 

I haven't used rb, so I don't know much about it, but maybe this will help you anyway:

You can set SASLs error report handler to write to disk, see http://www.erlang.org/doc/man/sasl_app.html :

sasl_error_logger = Value <optional>

Value is one of:

...

{file,FileName}

Installs sasl_report_file_h in the error logger. This makes all reports go to the file FileName. FileName is a string.

...

I also dimly remember there being a way to install a custom handler callback, but I can't seem to find it right now, unfortunately.

Amadiro