This page describes how to create log files at the server level and name them based on an arbitrary context. You do this with SLF4J + Logback + Jetty Webapp Logging in the mix. Find example projects for this feature at github:
https://github.com/jetty-project/jetty-and-logback-example
Table 7.1. GitHub Example Project
Modules | Description |
---|---|
/jetty-distro-with-logback-basic/ | Configures the jetty distribution with logback enabled at the server level with an example logback configuration. |
/jetty-distro-with-logback-sifting/ | Configures the jetty distribution with logback, centralized webapp logging, an MDC handler, and a sample logback configuration that performs sifting based on the incoming Host header on the requests. |
/jetty-slf4j-mdc-handler/ | Provides the SLF4J MDC key/value pairs that Jetty needs to perform the sample sifting. |
/jetty-slf4j-test-webapp/ | A sample webapp+servlet that accepts arbitrary values on a form POST and logs them via SLF4J, so that you can see the results of this example. |