Mats and Garry,<br><br>Actually that was exactly what I was looking for, I only had it in mind like this (felt kind off natural):<br><br>error_logger:error_report([{module, ?MODULE}, {function, ?FUNCTION}, {error, Error}]).
<br><br>However, what you propose works well enough for my purposes!<br><br>Thanks,<br>Adam<br><br><div><span class="gmail_quote">On 9/21/07, <b class="gmail_sendername">mats cronqvist</b> <<a href="mailto:mats.cronqvist@ericsson.com">
mats.cronqvist@ericsson.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Thu, 2007-09-20 at 15:35 +0100, G Bulmer wrote:
<br>[...]<br>> As I said, this is only curiosity, but if the need is a run-time<br>> name, maybe an ingenious function to dig through the stack trace<br>> returned by erlang:get_stacktrace() would be workable.<br>
<br>  in that case, i think something like this is a lot simpler;<br><br>-define(LOG(T),error_logger:info_report([process_info(self(),current_function)|T])).<br><br>  e.g.<br>go() -> ?LOG([{xxx,yyy}]).<br><br>  will print
<br><br>=INFO REPORT==== 21-Sep-2007::11:08:38 ===<br>    current_function: {foo,go,0}<br>    xxx: yyy<br><br>  mats<br><br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">
erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br>