Skip to content

Instantly share code, notes, and snippets.

@daleharvey
Created March 4, 2010 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save daleharvey/322243 to your computer and use it in GitHub Desktop.
Save daleharvey/322243 to your computer and use it in GitHub Desktop.
-module(hn_shell).
-compile([ export_all ]).
start() ->
Pid = spawn(?MODULE, print, [group_leader()]),
erlang:trace(all, true, [call, {tracer, Pid}]),
erlang:trace_pattern({error_logger, info_msg, '_'}, true, [local]).
print(Leader) ->
receive
Msg ->
io:format(Leader, "Msg: ~p~n", [Msg])
end,
?MODULE:print(Leader).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment