report browser and error_logger

Chandrashekhar Mullaparthi Chandrashekhar.Mullaparthi@REDACTED
Wed Jan 9 17:51:16 CET 2002


Yes it is typical in real OTP apps. We use run_erl to start our production
nodes - and if you need to connect to the shell - we use to_erl. We can then
use all interactive commands of rb. rb can also redirect all output to a
specified file. YOu can either specify options in rb:start/1 or use
rb:start_log/1.

We have another way of looking at the error logger reports on a live node.
We have an application which installs a error_logger event handler so that
it receives all error reports. Another process accepts connections on a
socket and writes all error reports to that socket. So we just telnet to
that port and we see all error reports. 

hope this helps.
Chandru

-----Original Message-----
From: Hal Snyder [mailto:hal@REDACTED]
Sent: 9 January 2002 16:15
To: erlang-questions@REDACTED
Subject: report browser and error_logger


I think I am missing something obvious. The error_logger looks like a
very useful thing for tracking events in OTP and in one's own
applications. 

I think the way to use it is thus:

  - add the sasl app to your .rel file
  - tune error file settings by setting sasl_error_logger,
    error_logger_mf_dir, and so forth in your .config file
  - write messages with error_logger:error_msg/1 and
    error_logger:info_msg/1
  - view results with rb: commands

1. Is the above typical in real OTP apps?

2. Is it common to use rb: interactively (not just start_log to a
file) in a production environment? If so, how?

Surely you don't leave an erlang shell open on a production node. (I
suspect that most production nodes run erl .... -detached.) But, the
interactive commands in rb: write to tty. So, in order to run them,
you need an erlang shell on the node in question. Attaching from
another node via Ctrl-g r [node] does not give you access to the
interactive commands of rb:, which still want to go to the stdout of
the original node. There is mention in the docs of copying log files
from a running area to somewhere else and using an offline node (with
error_logger configured to read/write in that copy area) to look at
the copies. But that sounds very awkward. How do real OTP apps do
this?

Thanks!



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.





More information about the erlang-questions mailing list