Pardon the mushy answer, as I'm not sure, but I believe CXF uses JDK logging internally, so you can't use Log4J even if you wanted to--that is, if Log4J doesn't have some ability to capture/trap Java logging, which it might (I don't know).
HTH, Glen 2008-06-19 Maurer Uwe wrote: > How can i accomplish to get the embedded jetty in apache-cxf use the > appender-layout defined within my log4j.properties configuration file > instead of the default layout? > I already got cxf to use my log4j configuration by providing the following > system-property: > -Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger > > My log4j configuration is as follows: > log4j.appender.Console=org.apache.log4j.ConsoleAppender > log4j.appender.Console.layout=org.apache.log4j.PatternLayout > log4j.appender.Console.layout.ConversionPattern=%d %-5p %c - %m - [%t]%n > > log4j.rootLogger=WARN, Console > > log4j.logger.org.apache.cxf=INFO, Console > log4j.logger.org.mortbay=INFO, Console > > The log-output is as follows: > 2008-06-19 14:06:04,891 INFO org.apache.cxf.endpoint.ServerImpl - Setting > the server's publish address to be XXX - [main] > 2008-06-19 14:06:04,891 INFO org.apache.cxf.endpoint.ServerImpl - Setting > the server's publish address to be XXX - [main] > 2008-06-19 14:06:04.953::INFO: Logging to STDERR via > org.mortbay.log.StdErrLog > 2008-06-19 14:06:04.969::INFO: jetty-6.1.9 > 2008-06-19 14:06:05.063::INFO: Started [EMAIL PROTECTED]:9877 > 2008-06-19 14:06:06,512 INFO com.foo.bar.FooBar - Backend startet > 1213877160807 - [main] > > The desired log-output would be similar to this: > 2008-06-19 14:06:04,891 INFO org.apache.cxf.endpoint.ServerImpl - Setting > the server's publish address to be XXX - [main] > 2008-06-19 14:06:04,891 INFO org.apache.cxf.endpoint.ServerImpl - Setting > the server's publish address to be XXX - [main] > 2008-06-19 14:06:04,953 INFO Logging to STDERR via > org.mortbay.log.StdErrLog > 2008-06-19 14:06:04,969 INFO jetty-6.1.9 > 2008-06-19 14:06:05,063 INFO Started [EMAIL PROTECTED]:9877 > 2008-06-19 14:06:06,512 INFO com.foo.bar.FooBar - Backend startet > 1213877160807 - [main] > > I have already tried the specific jetty system-property to control jetty not > to use java util logging, but that didn't do the trick: > -Dorg.mortbay.log.LogFactory.noDiscovery=false > > Thanks for any help. > > Uwe >
