Quantcast

gathering error reports on a single node

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

gathering error reports on a single node

Joel Reymont
Is there a recipe for gathering error_logger output from several nodes  
on a single one?

I would like to redirect the error_logger output for my cluster to the  
shell prompt of the node I'm connected to and looking at.

        Thanks, Joel

---
fastest mac firefox!
http://wagerlabs.com





________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gathering error reports on a single node

Michael Truog
That is suppose to be taken care of for you with the
erlang:group_leader/0.  By default the error_logger uses the tty option
to use stdout which should find its way to your shell, as long as all
processes doing the error_logger-ing have the same group_leader.  (at
least that is the way I understand it)


Joel Reymont wrote:

> Is there a recipe for gathering error_logger output from several nodes
> on a single one?
>
> I would like to redirect the error_logger output for my cluster to the
> shell prompt of the node I'm connected to and looking at.
>
>     Thanks, Joel
>
> ---
> fastest mac firefox!
> http://wagerlabs.com
>
>
>
>
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>


________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gathering error reports on a single node

Joel Reymont
So something like this from the shell then?

[ group_leader(group_leader(), rpc:call(Node, erlang, whereis,  
[error_logger])) || Node <- nodes()].

On Sep 4, 2009, at 9:51 PM, Michael Truog wrote:

> That is suppose to be taken care of for you with the
> erlang:group_leader/0.  By default the error_logger uses the tty  
> option
> to use stdout which should find its way to your shell, as long as all
> processes doing the error_logger-ing have the same group_leader.  (at
> least that is the way I understand it)

---
fastest mac firefox!
http://wagerlabs.com





________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gathering error reports on a single node

Michael Truog
I think that should work since error_logger depends on io:format/3 as
shown in  lib/erlang/lib/stdlib-1.16.2/src/error_logger_tty_h.erl.  If
the group_leader isn't set in other processes, they would need to depend
on error_logger output.  If you care about sasl, it seems like it would
need to also have the group_leader set.  It is easier if you set the
group_leader at the top of the process hierarchy though... if that is
possible.

Joel Reymont wrote:

> So something like this from the shell then?
>
> [ group_leader(group_leader(), rpc:call(Node, erlang, whereis,
> [error_logger])) || Node <- nodes()].
>
> On Sep 4, 2009, at 9:51 PM, Michael Truog wrote:
>
>> That is suppose to be taken care of for you with the
>> erlang:group_leader/0.  By default the error_logger uses the tty option
>> to use stdout which should find its way to your shell, as long as all
>> processes doing the error_logger-ing have the same group_leader.  (at
>> least that is the way I understand it)
>
> ---
> fastest mac firefox!
> http://wagerlabs.com
>
>
>
>
>


________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Loading...