You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Dušan Mamrilla <ma...@gmail.com> on 2007/10/03 13:38:29 UTC

Re: Logging small puzzle

Hi Freeman,

  I tried to force cxf to log with log4j by following your instructions. And
I am getting this error when spring tries to create bean with name '
org.apache.cxf.catalog.OASISCatalogManager' from [META-INF/cxf/cxf.xml]:
...
Caused by: java.util.MissingResourceException: Can't find
org.apache.cxf.catalog.Messages bundle
    at java.util.logging.Logger.setupResourceInfo(Logger.java:1329)
    at java.util.logging.Logger.<init>(Logger.java:224)
    at org.apache.cxf.common.logging.AbstractDelegatingLogger.<init>(
AbstractDelegatingLogger.java:43)
    at org.apache.cxf.common.logging.Log4jLogger.<init>(Log4jLogger.java:66)
    ... 54 more

I am using cxf 2.0.2 release. Any ideas what went wrong ?

Thanks in advance,
 DM

2007/9/29, Freeman Fang <fr...@iona.com>:
>
> Hi Benson,
>
> By default, cxf will use java.until.Logger. If you want to use log4j in
> cxf, you also need invoke
>
> LogUtils.setLoggerClass(Log4jLogger.class);
> at very first place to make sure Log4j logger is registered.
>
> You can get more details about how it works from
>
> https://svn.apache.org/repos/asf/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/
>
> Best Regards
>
> Freeman
>
> Benson Margulies wrote:
> > I've got a log4j config file as follows. Anyone have a guess as to why I
> > keep seeing CXF 'INFO' level messages?
> >
> >
> >
> >
> >
> > # Set root logger level to ERROR and its only appender to A1.
> >
> > #
> >
> > log4j.rootLogger=ERROR, A1
> >
> >
> >
> > # A1 is set to be a ConsoleAppender.
> >
> > log4j.appender.A1=org.apache.log4j.ConsoleAppender
> >
> >
> >
> > # A1 uses PatternLayout.
> >
> > log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> >
> > log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
> >
> >
> >
> >
> >
> >
> >
>

Re: Logging small puzzle

Posted by Freeman Fang <fr...@gmail.com>.
We fix it after 2.0.2 release, so you need try the latest trunk.

Best Regards

Freeman


On 10/3/07, Dušan Mamrilla <ma...@gmail.com> wrote:
>
> Hi Freeman,
>
> I tried to force cxf to log with log4j by following your instructions. And
> I am getting this error when spring tries to create bean with name '
> org.apache.cxf.catalog.OASISCatalogManager' from [META-INF/cxf/cxf.xml]:
> ...
> Caused by: java.util.MissingResourceException: Can't find
> org.apache.cxf.catalog.Messages bundle
>    at java.util.logging.Logger.setupResourceInfo(Logger.java:1329)
>    at java.util.logging.Logger.<init>(Logger.java:224)
>    at org.apache.cxf.common.logging.AbstractDelegatingLogger.<init>(
> AbstractDelegatingLogger.java:43)
>    at org.apache.cxf.common.logging.Log4jLogger.<init>(Log4jLogger.java
> :66)
>    ... 54 more
>
> I am using cxf 2.0.2 release. Any ideas what went wrong ?
>
> Thanks in advance,
> DM
>
> 2007/9/29, Freeman Fang <fr...@iona.com>:
> >
> > Hi Benson,
> >
> > By default, cxf will use java.until.Logger. If you want to use log4j in
> > cxf, you also need invoke
> >
> > LogUtils.setLoggerClass(Log4jLogger.class);
> > at very first place to make sure Log4j logger is registered.
> >
> > You can get more details about how it works from
> >
> >
> https://svn.apache.org/repos/asf/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/
> >
> > Best Regards
> >
> > Freeman
> >
> > Benson Margulies wrote:
> > > I've got a log4j config file as follows. Anyone have a guess as to why
> I
> > > keep seeing CXF 'INFO' level messages?
> > >
> > >
> > >
> > >
> > >
> > > # Set root logger level to ERROR and its only appender to A1.
> > >
> > > #
> > >
> > > log4j.rootLogger=ERROR, A1
> > >
> > >
> > >
> > > # A1 is set to be a ConsoleAppender.
> > >
> > > log4j.appender.A1=org.apache.log4j.ConsoleAppender
> > >
> > >
> > >
> > > # A1 uses PatternLayout.
> > >
> > > log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> > >
> > > log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>