geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell E Glaue <>
Subject Re: feature? ContainerGroup
Date Wed, 17 Dec 2008 17:02:49 GMT
>>> On that same line, I also need to be able to configure logging for each
>>> JettyContainer on each port (project), configuring the log name and
>>> location. I
>>> need separated log files, and I also need syslog facility.
>> What is the syslog facility?  Do you know if it is available in plain
>> jetty?
> Plain jetty has it, only as built in to log4j.
> Here is the sample:
> file: Jetty/extra/resources/log4j.xml
> -
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> <log4j:configuration xmlns:log4j="";
> debug="false">
> ...
> <!-- Syslog events
> <appender name="SYSLOG" class="">
> <param name="Facility" value="LOCAL7"/>
> <param name="FacilityPrinting" value="true"/>
> <param name="SyslogHost" value="localhost"/>
> </appender>
> -->
> ...
> </log4j:configuration>
> -
> However, We use Syslog to send all our access logs to a centralized server.
> Although geronimo.log, the "error" log, is log4j, configured in
> var/log/ - It looks like NCSARequestLog, the "access"
> log, is not Log4j
> Do you know any more about this?
> Syslog is an operating system level logging mechanism.
> OS application send their logs to the syslog daemon in addition to, or instead
> of, to a file.
> The syslog manages the log information, sending it to disk or over the network
> to a centralized logging server.
> The syslog facility is something like a group. The group is configured to
> operate in some fashion, so you can do something like send this facility to this
> log file, and send this facility to this centralized log server.

This thread described how to set up separated logging for each container, which
entailed deploying a gbean (which only contained a single plan.xml file) to
configure a new instance of NCSARequestLog.
Each instance is configured separately, and then referenced in the container
One would likely want to deploy new instances of WebContainer and RequestLog
together in a single gbean.

As far as syslog support goes, there is none for access/request logs. Syslog
exists in Jetty for Application/server logs however.

There is now a Feature Request submitted to the Jetty Project:

It entails a request to implement a new RequestLog with support for slf4j
( and Logback (
Logback support many appenders, with support for creating custom appenders

Among the supported appenders are:

It has support for JMX:

And slf4j supports Log4j for those needing that:


What is also interesting, is Logback Context Selectors

This may seem like it can give us the ability to have one instance of Logback
serving many different separated logging environments.

We have discussed how Geronimo/Jetty might eventually support web application
filtering in a single WebContainer. In this way a WebContainer can listen on two
ports, and serve web applications on one port but not the other.

With the current implementation of NCSARequestLog, both web applications (and
thus also request traffic on both ports) can only log to one single log file as
configured in the NCSARequestLog tied into the WebContainer.

However! With Logback context selectors, it looks like it might be possible to
free the web apps (and also request traffic by port) from this restriction.

At first look of Logback, it looks like Geronimo could be configured with one
single Jetty WebContainer, and one single RequestLog using Logback, but be able
to log into separate files based on port and/or based on web application using
Logback context selectors.


View raw message