Re: Best practice on declaring Loggers

2006-06-13 Thread Javier Gonzalez
On 6/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'm new to JAVA and log4j, but I created a singleton object to be my logger that is used by all the classes in a single threaded project I'm working on.. Is this bad? I suppose I didn't know how to use the log4j api correctly, but I was

RE: Best practice on declaring Loggers

2006-06-13 Thread Joshua.P.Williams
so I created a singleton object that every other object uses and it solved my problem (no more duplicate entries in my logs). -Original Message- From: Konstantinos Karadamoglou [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 13, 2006 8:19 AM To: Log4J Users List Subject: Re: Best practice on de

Re: Best practice on declaring Loggers

2006-06-13 Thread Konstantinos Karadamoglou
What about shared classes that operate in a server environment should be log using static Loggers? Is there any implication when doing that? Thanks, Kostas On 13/06/06, Konstantinos Karadamoglou <[EMAIL PROTECTED]> wrote: thank you Javier! On 13/06/06, Javier Gonzalez <[EMAIL PROTECTED]> wro

Re: Best practice on declaring Loggers

2006-06-13 Thread Konstantinos Karadamoglou
thank you Javier! On 13/06/06, Javier Gonzalez <[EMAIL PROTECTED]> wrote: I usually like to declare them private static final. Private because I don't want any other class accessing the logger, and static final to keep it "separate" from the class instances. The exception being when you are su

Re: Best practice on declaring Loggers

2006-06-13 Thread Javier Gonzalez
I usually like to declare them private static final. Private because I don't want any other class accessing the logger, and static final to keep it "separate" from the class instances. The exception being when you are subclassing, then it is useful to declare the logger on the superclass like thi