Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] I can't log (slf4j) with 7.5.1.v20110908 (works with 7.4.5.v20110725)

I went ahead and wrote up a demo distribution today to fix a slf4j-log4j bug surrounding argument expansion with slf4j LocationAwareLogger and jetty.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=357216

It has the fortunate side effect of being a demonstration of activating log4j under jetty.
It is coded up for 7.5.2-SNAPSHOT at the moment (as I was fixing the above bug), but the jetty version can easily be swapped out with the top level pom's <jetty-version> property.

So far, jetty server generated logs work as expected thru the layers of Jetty Log > Jetty Slf4JLog > Slf4j-Api -> Slf4j-Log4J12 -> Log4j > console.
I'll be testing out the log4j generated logging events from webapps next.

Feel free to poke around in the configuration generated in 
jetty-and-log4j-example/jetty-distro-with-log4j/target/jetty-distro/jetty-distribution-7.5.2-SNAPSHOT/

Note: 7.5.2-SNAPSHOT is being deployed to oss.sonatype.org right now, so be patient.
--
Joakim Erdfelt
joakim@xxxxxxxxxxx

http://webtide.com | http://intalio.com
(the people behind jetty and cometd)



On Fri, Sep 9, 2011 at 3:33 AM, Filipe Sousa <natros@xxxxxxxxx> wrote:
Hi,

After switching from 7.4.5.v20110725 to 7.5.1.v20110908 I can't get
any log (slf4j) information.

I have this in my log4j.properties:
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%c]: %m%n
log4j.logger.org.eclipse.jetty.util.log=INFO
log4j.logger.pt.ipb.creditacao.server=DEBUG

For development I'm using jetty in embedded mode (I'm calling
XmlConfiguration jetty.xml inside eclipse) and when I start jetty
7.4.5.v20110725 and can see logging information in eclipse console

2011-09-09 11:10:51,587 INFO  [org.eclipse.jetty.util.log]:
jetty-7.4.5.v20110725
2011-09-09 11:10:51,604 INFO  [org.eclipse.jetty.util.log]: Deployment
monitor /home/fsousa/workspace/creditacao/contexts at interval 1
2011-09-09 11:10:51,607 INFO  [org.eclipse.jetty.util.log]: Deployable
added: /home/fsousa/workspace/creditacao/contexts/creditacao.xml
2011-09-09 11:10:51,777 INFO  [org.eclipse.jetty.util.log]: No
Transaction manager found - if your webapp requires one, please
configure one.
2011-09-09 11:10:51,837 INFO
[pt.ipb.creditacao.server.guice.GuiceListener]: Guice
2011-09-09 11:10:52,141 INFO  [org.eclipse.jetty.util.log]: started
o.e.j.w.WebAppContext{/creditacao,file:/home/fsousa/workspace/creditacao/WebContent/}
2011-09-09 11:10:52,834 INFO  [org.eclipse.jetty.util.log]: Started
SelectChannelConnector@localhost:8080 STARTING

With jetty 7.5.1.v20110908, I can only see logs from my web
application but not from jetty
2011-09-09 11:14:05,883 INFO
[pt.ipb.creditacao.server.guice.GuiceListener]: Guice

Is the 7.5.1.v20110908 the last version? I cant't find any release announcement.

Fedora 64bit
$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Thanks
--
Filipe Sousa
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top