Ryan Hofschneider ha scritto:
Howdy:
I am trying to determine how to make GeoServer respect the log4j configuration I am managing at the container level using JBoss 4.0.3SP1. (Also, although I do not believe it is relevant to my particular issue, I have updated the log4j libraries that ship with 4.0.3SP1 to a version that supports TRACE -- otherwise GeoServer won't deploy at all under my setup.)
I have looked at bit at the source for GeoServer.configureGeoServerLogging() and have experimented with the directives in DEFAULT_LOGGING.properties.
In particular, I have removed the definition of log4j.appender.geoserverlogfile and that prevents the Geoserver- specific log from being created under data/logs, however it GeoServer seems to disrupt the normal logging flow that I manage at the container level -- nothing else will get logged.
I am not a Log4J guru, but I see that GeoServer.configureGeoServerLogging() calls LogManager.resetConfiguration(), which seems suspicious. Any pointers would be appreciated.
Well, long story short, GeoServer as it's now controls its logging
subsystem programmaticaly and won't work in an environment where
logging is supposed to be container managed. In your case it seems
that container managing the logging subsystem has other adverse
issue, such as break of application isolation (what geoserver
does affects the other apps as well).
I guess we need a new setup option allowing GeoServer to work in
such environment, that makes GeoServer refrain to do anything
but redirecting the log (since, due to a long story I won't explain
here, we're actually using java logging and redirecting it to log4j).
I think we can create a concept of logging modes:
* pure java logging (controlled by the system wide property file or
by the container)
* pure log4j logging (controled by the container)
* geoserver controlled logging (as it is now).
I've opened a jira issue to avoid forgetting about it (I doubt
this will be changed by 1.6.0, more likely by 1.6.1):
http://jira.codehaus.org/browse/GEOS-1671
Cheers
Andrea