[erlang-questions] Logging interprocess communication

Jachym Holecek freza@REDACTED
Sun Dec 9 14:39:51 CET 2012


# Yash Ganthe 2012-12-09:
> In an Erlang VM when one process send a message to another using: Pid !  
> MyMessage we would like to log this interaction to a log file. We need to  
> do this without having the developer introduce explicit log statements all  
> over the code wherever one process communicates with another.
> 
> What is the best way to achieve this?

There's a builtin tracing facility inside the VM, controlled by
erlang:trace/3 and friends. The dbg(3) module builds on top of
it, supports dumping traces to file among other things. Not sure
if there are more elaborate frontends or step-by-step documents.

BR,
	-- Jachym



More information about the erlang-questions mailing list