Re: getConfigurationFileName()

2003-09-29 Thread Scott Morgan
Hi Henrik, Try; DOMConfigurator.configureAndWatch(YourClass.class.getResource(xml/log4j.xml)); for log4j.xml Or PropertyConfigurator.configureAndWatch(YourPropertyFile); for log4j.properties Is there a way that I can get the filename and absolute path for the file used to configure

Questions on initial log4j instance

2003-09-29 Thread Yu Xiang Xi (Maveo)
I have seen different usage of initial log4j instance like below private final static Logger logger = Logger.getLogger(some.name); and private final transient static Logger logger = Logger.getLogger(some.name); the second one has a additional keyword transient. Which way is recommended?

reconfigure an already configured log4j

2003-09-29 Thread Michael Erskine
Firstly, allow me to apologise if this question has already been answered - I don't have access to a searchable archive of the list. I am using log4j within the OpenEJB EJB server and I am able to set my configuration file (via the property -Dlog4j.configuration=file:conf/logging.conf) add

RE: bad days and good days

2003-09-29 Thread Shapira, Yoav
Howdy, I spent most of the day, going over the documentation on log4j and various ways of logging under Tomcat. Great article on commons-logging vs. Log4j :) I saw a reference to how different web-applications can have different log4j configurations in think again, but I am not sure where that

RE: getConfigurationFileName()

2003-09-29 Thread Shapira, Yoav
Howdy, If you used a classpath-discovery-based mechanism for configuring log4j, you can do this: http://javaalmanac.com/egs/java.lang/ClassOrigin.html?l=rel to figure out if it came from a jar and if so which jar. But that's a partial solution at best ;( Yoav Shapira Millennium ChemInformatics

Re: different files

2003-09-29 Thread Alan Roberto Romaniuc
Ceki Gülcü wrote: Alan, Have you tried putting log4j.jar in a directory accessible to the common loader? At 01:07 PM 9/26/2003 -0300, Alan Roberto Romaniuc wrote: Hi, Yep, I did it A, B, L are in the same webapp the problem is that I am not able to log thing from library

RE: reconfigure an already configured log4j

2003-09-29 Thread Michael Erskine
* QUESTION 2: Why doesn't log4j like my config file URLs? They look logical to me :) - are they broken? I've solved this one -- all I needed to do is pass the filename rather than a URL (I can't

RE: Questions on initial log4j instance

2003-09-29 Thread Cakalic, James
Agree -- private static final Logger is what I recommend. Modifiers are static then final, not vice versa. JLS section 8.3.1 defines the production FieldModifier: one of public protected private static final transient volatile and states, If two or more (distinct) field modifiers

Re: Questions on initial log4j instance

2003-09-29 Thread Ceki Gülcü
At 04:58 PM 9/29/2003 +0800, Yu Xiang Xi (Maveo) wrote: I have seen different usage of initial log4j instance like below private final static Logger logger = Logger.getLogger(some.name); looks good. and private final transient static Logger logger = Logger.getLogger(some.name); the

RE: Questions on initial log4j instance

2003-09-29 Thread Shapira, Yoav
Howdy, I hate to be such a nitpick on this, and it's a matter of style only not substance, but in case you care, things that are static final should be capitalized, so if you have a private static final Logger it should be private static final Logger LOGGER = Logger.getLogger(some.name); If

Re: Questions on initial log4j instance

2003-09-29 Thread Kevin Klinemeier
Do you mean 'volatile' here? I can't find in the JLS where transient has this affect. It wouldn't be the first time I've looked for something in the JLS and not found it, though. -Kevin --- Ceki Gülcü [EMAIL PROTECTED] wrote: Moreover, in addition to serialization aspects, the keyword

Re: Questions on initial log4j instance

2003-09-29 Thread Ceki Gülcü
Yes, of course 'volatile' not 'transient'. I somehow merged volatile and transient in my mind. At 09:50 AM 9/29/2003 -0700, Kevin Klinemeier wrote: Do you mean 'volatile' here? I can't find in the JLS where transient has this affect. It wouldn't be the first time I've looked for something in