<div dir="ltr"><div class="gmail_quote"><br><div dir="ltr">Apropos of all this macro and inline stuff, I tried Richard's suggestion for inlining but immediately hit an annoyance.<br><br>in.hrl:<br>-compile({inline, [{flog,3}]}).<br>
<br>flog(L, F, A) -><br> case iutil_log:ok_to_log(info) of<br>
true -><br> iutil_log:log_info(?MODULE, L, F, A);<br> false -><br> ok<br> end.<br><br>logtest.erl:<br>-module(logtest).<br>-include("in.hrl").<br>-export([go/0]).<br>
<br>go() -><br> flog(?LINE, "Just logged using ~p's scheme~n", ["Richard O'Keefe"]).<br><br>$ efine@ender:/tmp$ erlc logtest.erl<br>./logtest.erl:3: attribute 'export' after function definitions<br>
./in.hrl:3: Warning: function flog/3 is unused<br>./logtest.erl:5: Warning: function go/0 is unused<br><br>Now to use this scheme, I have to ensure I put the -include AFTER all export statements. Seems annoying. Is there another way?<br>
<br>E.<br><br></div>
</div><br></div>