Configuring the logger
Yang Zhang
yanghatespam at gmail.com
Wed Jun 17 17:25:02 EDT 2009
Yang Zhang wrote:
> Hi, in our application we're using log4j and we have a log4j.properties
> file that produces logs formatted like this:
>
> 2009-06-17 12:24:16,730 10900 [main-EventThread] INFO
> org.apache.bookkeeper.cli...
>
> However, netty produces differently formatted log messages:
>
> Jun 17, 2009 12:24:47 PM org.jboss.netty.channel.SimpleChannelHandler
> WARNING: EXCEPTION, please implement
> com.yahoo.pubsub.server.netty.UmbrellaHandl...
> org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted
> frame length...
>
> Also tried adding the line to the start of our app, but that made no
> difference:
>
> InternalLoggerFactory.setDefaultFactory(Log4JLoggerFactory.getDefaultFactory());
>
>
> Thanks in advance for any hints.
Oops, the correct approach was to do:
InternalLoggerFactory.setDefaultFactory(new Log4JLoggerFactory());
--
Yang Zhang
http://www.mit.edu/~y_z/
More information about the netty-users
mailing list