[slf4j-dev] [Bug 31] Varargs for Logger methods
bugzilla-daemon at pixie.qos.ch
bugzilla-daemon at pixie.qos.ch
Thu Apr 1 02:17:20 CEST 2010
http://bugzilla.slf4j.org/show_bug.cgi?id=31
--- Comment #82 from Ralph Goers <rgoers at apache.org> 2010-04-01 02:17:20 ---
I have no idea what the compiler is doing. I had a method
isEnabled(Level level, Marker marker, String msg, Object... args);
I was calling it as
isEnabled(level, marker, msg, null);
I was stunned at how much worse this was than SLF4J/Logback.
I changed it to
isEnabled(Level level, Marker marker, String msg);
and call it as
isEnabled(level, marker, msg)
and the performance is about the same as SLF4J/Logback. After that I made
methods with 1, 2, and 3 params and then one that finally accepts varargs, very
similar to how SLF4J does it.
Interestingly, just before working on this code I attended a talk by Joshua
Block were he discussed something very similar.
http://www.cs.umd.edu/class/fall2009/cmsc132H/slides/still-effective.pdf - See
slide 27.
--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the slf4j-dev
mailing list