[slf4j-user] Best practice on declaring Loggers
Konstantinos Karadamoglou
kkarad at googlemail.com
Tue Jun 13 15:27:54 CEST 2006
hi Boris,
Can you explain me how a static Logger can create problems at a shared class
in a server environment?
thank you in advance, Kostas
On 13/06/06, Boris Unckel <boris.unckel.mlg at gmx.net> wrote:
>
> Hi,
>
>
> >-------- Original-Nachricht --------
> >Datum: Tue, 13 Jun 2006 11:30:47 +0100
> >Von: Konstantinos Karadamoglou <kkarad at googlemail.com>
> > Which is the best practice of declaring Loggers? For instance, should
> > they be static, private, final? and why?
> this depends on the environment:
> For shared classes in server environments a "private final" is useful.
> For non-shared classes or non-server environments I recommend a "private
> static final" declaration.
>
> Generally you have less pain without "static" but you have more instances,
> which may become a problem.
>
> Regards
> Boris
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://slf4j.org/mailman/listinfo/user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-user/attachments/20060613/755088e8/attachment.htm>
More information about the slf4j-user
mailing list