Hi List,
I’ve been bashing my head against this one for an hour and figure I should probably just ask at this point.
I’ve installed MapFish Print as a separate Jetty servlet. I’m tweaking the geoserver logging file to try and get it to log MapFish Print stuff, ideally to a separate file.
Unfortunately I’m struggling to find documentation for log4j.properties - I suspect geoserver is using log4j 1; the log4j 2 documentation doesn’t reference .properties files.
Anyway, two issues:
-
(bug?) - Despite what http://docs.geoserver.org/stable/en/user/advanced/logging.html says, placing a new .properties file into the /logs/ directory doesn’t seem to be detected. Anyone else get this? (note: Using Jetty 8)
(work around - just modify one of the Geoserver ones). -
My bigger issue - I can finally get logging happening to a second file, but the logging is identical to that sent to the first file. I only want Mapfish Print stuff going to the second file. But MapFish Print stuff doesn’t seem to be getting logged at all anywhere.
my current file (based on GeoServer_developer_logging.properties) is below. Suggestions welcome.
Thanks,
Jonathan
log4j.rootLogger=WARN, geoserverlogfile, stdout, mapfishlogfile
###############
#Standard output (console)
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM HH:mm:ss} %p [%c] - %m%n
###############
GeoServer log File
log4j.appender.geoserverlogfile=org.apache.log4j.RollingFileAppender
Keep three backup files.
log4j.appender.geoserverlogfile.MaxBackupIndex=3
Pattern to output: date priority [category] - message
log4j.appender.geoserverlogfile.layout=org.apache.log4j.PatternLayout
log4j.appender.geoserverlogfile.layout.ConversionPattern=%d %p [%c] - %m%n
###############
log4j.category.log4j=FATAL
log4j.category.org.geotools=WARN
log4j.category.org.geotools.factory=WARN
log4j.category.org.geoserver=TRACE
log4j.category.org.vfny.geoserver=TRACE
log4j.category.org.springframework=WARN
###############
#MapFish log File
log4j.appender.mapfishlogfile=org.apache.log4j.RollingFileAppender
log4j.appender.mapfishlogfile.File=D:/GeoServer_Config_Dir/logs/mapfish-print.log
Keep three backup files.
log4j.appender.mapfishlogfile.MaxBackupIndex=3
Pattern to output: date priority [category] - message
log4j.appender.mapfishlogfile.layout=org.apache.log4j.PatternLayout
log4j.appender.mapfishlogfile.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %30.30c - %m%n
###############
log4j.logger.org.mapfish=DEBUG, mapfishlogfile
log4j.logger.org.pvalsecc=DEBUG, mapfishlogfile
This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.