siberian-fast-food / alogger

Simply the best logging framework for Erlang
Apache License 2.0
50 stars 16 forks source link

New macro API #22

Open si14 opened 13 years ago

si14 commented 13 years ago

2 forms — full ?DBG("~p ~p", [Foo, Bar]) and short ?DBG({Foo, Bar}) second one can be taken as first one with automagically formed format string every arg can be replaced with {lazy, Fun} — in this case alog_if:log_lazy is called instead of alog_if:log, or with {lazy, "Name", Fun} (in this case Name will be used as a name of resulting value in tuple expression) new form: ?DBG(["foobar", ARBITRARY_EXPRESSION]) new macro: ?DBG_TC() that measures time of execution of list-expr and lazy funs