Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Inconsistent logging behavior

If you want 1 log file per webapp, you'll have to configure that logging in the webapp context itself.
Each webapp will have its own log4j jars, and its own

You have configured Server logging, and that will log everything on the server side to a single log4j configuration.

Joakim Erdfelt / joakim@xxxxxxxxxxx

On Fri, May 19, 2017 at 2:43 PM, Michael McInness <m.mcinness1@xxxxxxxxx> wrote:
I'm using jetty (9.4.4) purely as a servlet container and have logging configured to use log4j. I configure logging as such:

jetty@foo:/opt/jetty-base/modules$ curl -O

jetty@foo:/opt/jetty-base/modules$ cd ..

jetty@foo:/opt/jetty-base$ java -jar /opt/jetty/start.jar --add-to-start=logging

then I copy the log4j properties file below to





log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{} - %X{} - %X{bundle.version} | %m%n





It works pretty well, but periodically I notice that, when I have multiple wars deployed, logging from one or the other disappears. After I restart jetty, everything is logged again for a while.

I am looking for guidance on how to configure jetty's logging to be bullet-proof and ideally, I'd like to have one log file per webapp.

Thanks in advance.

jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top