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?
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.
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 :
Value
is one of:...
Installs
sasl_report_file_h
in the error logger. This makes all reports go to the fileFileName
.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.
I start my remote shell via -remsh (
${ROOTDIR}/bin/erl -name shell@${NODE_IP} -remsh ${NODE_NAME}
). once there I set the rb_server group_leader to the current group_leader of the shell and rb henceforth prints its output to the active shell:EDIT: encapsulate it in a function for convenience:
regards, Tom