Log::Log4perl – Log4j implementation for Perl – metacpan.org
Evaluating parameters to logger methods may be expensive, but that’s outside the scope and responsibility of Log::Log4perl. So if you know that you have “expensive parameters”, you may “guard” your logger calls with “…->is_…()” method calls. Otherwise just don’t do so! It does not make sense. Read up the above manual page section! Why should the is_trace call be cheaper than the trace call itself? Of course it’s not. I guess, you got that.
Leave a Reply