Quoting Raymond DeCampo <[EMAIL PROTECTED]>: > Anybody know if the claims below have any merit? This is from a post on > comp.lang.programmer. >
I'm not completely sure about all the workings of JULI, but yes, if you use Logj4-1.2.xx, then you need to use the .properties format for Tomcat. The reason is that the logger names that Tomcat uses for its host and context loggers contain characters that aren't allowed in an XML attribute of type "id". In the DOMConfigurator, the "name" attribute is of type "id". For instance, a host logger would look like this... org.apache.catalina.core.ContainerBase.[Catalina].[localhost] The square brackets aren't allowed by an attribute of type "id" in XML. And since the DOMConfigurator uses a DTD, this is enforced. In Log4j-1.3, use of the JoranConfigurator, which doesn't use a DTD, works around this. Of course, we could release a modified version of the DTD in Log4j-1.2.12 with the "name" attribute not declared as of type "id". Thoughts? Jake > Thanks, > Ray > > -------- Original Message -------- > Subject: Re: Logging Strategy/best practice > Date: Fri, 29 Jul 2005 10:06:24 +0300 > From: A_Wieminer <[EMAIL PROTECTED]> > Organization: Elisa Internet customer > Newsgroups: comp.lang.java.programmer > References: <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > > >> 3. Anything else I should consider? > > Use the XML format for the properties file, not the .properties format. > > FYI, Tomcat5.5.x uses a new JULI (java.util.logging.interface) logging > for web applications. It can use JDKLog, Log4j or other implementations. > > I have read from tomcat site, that if you use Log4j as a logging > implementation you _must_ use .properties format. Its something to do > with how webapp-level logging is configured and xml format > incompatibilities. It is supposed to be fixed in later Log4j versions. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]