This page last changed on Jul 12, 2007 by saul.farber.

Most GeoServer logging conventions are directly inherited from GeoTools, see GEOT:5.1.3 Logging for more information.

Log profiles

The one little difference in GeoServer is that we take more control over the setting of the log output. On trunk (1.6.x) GeoServer allows users to set 'logging profiles' which correspond to a log4j logging properties file. There are five pre-built logging profiles which can be chosen by a user:

VERBOSE_LOGGING - this enables DEBUG level logging on org.geotools.* org.geoserver.* and org.vfny.*

GEOTOOLS_DEVELOPER_LOGGING - this enables DEBUG logging on org.geotools.* and INFO logging on org.geoserver.* and org.vfny.*

GEOSERVER_DEVELOPER_LOGGING - DEBUG on org.vfny.* and org.geotools., INFO on org.geotools. (except some really chatty packages which get WARN)

DEFAULT_LOGGING - enable INFO on all gt/gs levels (except the chatty geotools packages which get WARN)

PRODUCTION_LOGGING - enables WARN on all gt/gs levels

Custom log profiles

If you want to set up your own custom logging profile, you can use a trick to enable a non-standard logging profile. Here are the steps:

a. Copy DEFAULT_LOGGING.properties to CUSTOM_LOGGING.properties (or whatever you want to call it)

b. Modify your CUSTOM_LOGGING.properties file to reflect excatly the level of logging you want to have. For example, maybe you want to print the geotools arcsde DB queries, but nothing else. Add lines like:

log4j.category.org.geotools.arcsde.data.ArcSDEQuery=DEBUG
log4j.category.org.geotools=INFO

c. In your server.xml file, change the log profile to "CUSTOM_LOGGING.properties" (or whatever you called your custom log4j file)

d. When you next start up geoserver, that logging profile will be enabled, and you can directly control your logging using that log4j logging file. Just don't change anything in the "server" UI tab and then hit 'Save'.

GeoServer Log File

Log to file is always active now. Generally, expect to see most of your geoserver output in the DATA_DIR/logs/geoserver.log file (change it in the UI)

StdOut or Console Logging to the container's stdout logs

StdOut/Console logging is now disable-able. Check the 'suppress stdout logging' and geoserver won't pollute your container-wide System.out log any more. This is a bigger deal for folks who run geoserver along with other applications in a large J2EE container (like jboss or websphere)

Document generated by Confluence on Jan 16, 2008 23:26