[erlang-questions] logging from gen_server
Stanisław Pitucha
viraptor@REDACTED
Sun Apr 13 23:58:48 CEST 2008
Hi all,
I'm trying to add some more tracing to a process using gen_server
behaviour. I'd like to use dbg_opts() of that gen_server - so that it
prints trace only if sys:trace(name, true) was called for registered
'name' of that process. What I've found is that I can probably do:
{status, _, _, [_,_,_,DbgOpts,_]} = sys:get_status(name)
sys:handle_debug(DbgOpts, .....)
but that looks horrible and also returns whole PDict :/ (or maybe it
isn't that slow?)
Is there some easier way to do it? Couldn't find anything like that in docs.
More information about the erlang-questions
mailing list