[slf4j-dev] [Bug 163] Copy & paste of LoggerFactory.getLogger
bugzilla-daemon at pixie.qos.ch
bugzilla-daemon at pixie.qos.ch
Tue Dec 15 10:59:01 CET 2009
http://bugzilla.slf4j.org/show_bug.cgi?id=163
--- Comment #10 from Thorsten <thorsten.Moeller at unibas.ch> 2009-12-15 10:59:01 ---
I'd like to comment on this request. I'm totally against such an extension for
one simple reason. In my opinion there is a very simple and clean solution to
the copy-and-paste based and error prone approach to declaring logger
instances. Every modern IDE (and also editors such as emacs or vi) provide
(dynamic) code templates. For instance, I use Eclipse and one of my oldest
templates that I've added long time ago is this one (see also the attached
screenshot):
${:import(org.slf4j.Logger, org.slf4j.LoggerFactory)}${argType}
private static final Logger logger =
LoggerFactory.getLogger(${enclosing_type}.class);
Using this template one can declare a logger context sensitively in one fell
swoop! Rather than introducing probably leaky extensions to the code one should
make use of functions provided by modern tools.
If you agree then I suggest to add a short documentation to the Web site so
that (new) users can easily extend there Eclipse/IDE.
--
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