« Return to Thread: Some consideration on GeoServer logging

Re: Some consideration on GeoServer logging

by aaime :: Rate this Message:

Reply to Author | View in Thread

Martin Desruisseaux ha scritto:
> So should I open a JIRA task for "java.util.logger.Logger subclass that redirect
> everything to common-logging, including isLoggeable", or do we want to
> investigate other proposals?

It seems a satisfactory solution. No VM wide configuration, uses logging
levels coming from commons-logging. Seems a win to me as long as there
is no need to do anything VM wide.

I'm ok as long as we use a custom getLogger method in Geotools so that
we don't need to pass anything to the VM.

So to sum up and check if I understand properly:
* we create a java.util.logger.Logger subclass, CommonLogger, that
   delegates everything to commons logging
* we switch all Logger.getLogger(xxx) methods to a special gt2
   utility class that will return either the plain java logging
   logger, or the CommonLogger, depending on a configuration
* we'll have some way to switch gt2 logging one way or the other
   (and the same will have to work for GeoServer as well).

Given that commons logging and log4j are well isolated
classloader wise it may even be that two GeoServer instances running
in the same container will be able to work with separate logging
levels... oh well, at least this solution has the advantage of
not touching the rest of java logging.

One question still... this approach will preserve java logging handlers
right? This may speak trouble. By default java logging is configured
to log onto the console, and log4j too.. won't this mean we'll get
all messages that are loggable according to both subsystems twice
on the console?

Cheers
Andrea


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@...
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

 « Return to Thread: Some consideration on GeoServer logging