ngageoint / elasticgeo

ElasticGeo provides a GeoTools data store that allows geospatial features from an Elasticsearch index to be published via OGC services using GeoServer.
GNU General Public License v3.0
169 stars 85 forks source link

How do you configure logging? #35

Closed nreese closed 7 years ago

nreese commented 7 years ago

Can you please provide an example of configuring the logging to display all elasticsearch requests and responses.

sjudeng commented 7 years ago

Add the below two lines to the GeoServer logging configuration file.

log4j.category.mil.nga.giat.data.elasticsearch=DEBUG
log4j.category.mil.nga.giat.process.elasticsearch=DEBUG

The logging configuration file will be in the logs subdirectory in the GeoServer data directory. Check GeoServer global settings for which file is being used (e.g. DEFAULT_LOGGING.properties, etc.).

elasticsearch_logging

The plugin does log requests but does not currently log responses unless there's an error. You could also try adding something like log4j.logger.org.elasticsearch=DEBUG or log4j.logger.org.apache.commons.httpclient=DEBUG to get more detailed logging. I haven't tried that before though.

Let me know if this doesn't work. Either way please keep this issue open as the documentation here should be updated with this information.