From: Jan B. <ja...@mo...> - 2006-06-30 10:38:53
|
William, The JDK logging stuff unfortunately only uses the System classpath to find it's formatters and handlers. Big mistake I think. Anyway, the only way around this is that I have found is to write your own LogManager class that knows to use the ThreadContextClassLoader to find classes. I've actually already written this but it isn't checked into the Jetty repository. I will consider moving it into Jetty and supplying a patch so that the start.config file uses the JDK logger. I'm currently travelling so I probably won't be able to do this until early next week. regards Jan William Evans wrote: > I have a large application which I have wrapped in a servlet and which I > want to run inside Jetty. The application uses the Sun JDK1.4 Logger and > writes out using a custom format. This is done by implementing a class > that extends java.logging.util.Formatter and specifing it in the > logging.properties file. As long as the class is in the classpath > everything normally works fine. > > So, to incorporate my App into Jetty, I ensure that my custom Formatter > class is in the Jetty classpath by specifying my jar in the > "start.config" file. I know that the jar is being included because my > application writes the classpath to the console and other classes of > mine are being called. > > I also, for good measure, use the following run-time flags: > > -Dorg.mortbay.log.LogFactory.noDiscovery=false > -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger > > > However, the JDK Logger doesn't appear to want to find my class and > defaults to using it's own Formatters. > > I know that Tomcat has similar issues and did manage to get their > workaround to work. However, I cannot see how to get this working with > Jetty. Can anyone help??? > > Version of Jetty: 5.1.11RC0 > OS: Windows 2k > JDK: 1.5 > > > ------------------------------------------------------------------------ > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > jetty-discuss mailing list > jet...@li... > https://lists.sourceforge.net/lists/listinfo/jetty-discuss |