Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid GeoTools logging redirection to Log4J #260

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

groldan
Copy link
Member

@groldan groldan commented Jul 7, 2022

Missed to tell geotools not to redirect logging. Defaults to Log4J and may cause errors like the following:

java.lang.NoSuchMethodError: 'org.apache.logging.log4j.Logger org.apache.logging.log4j.core.config.Configurator.setLevel(org.apache.logging.log4j.Logger, org.apache.logging.log4j.Level)'
	at org.geotools.util.logging.Log4J2Logger.setLevel(Log4J2Logger.java:171)
	at org.geotools.xml.XMLSAXHandler.<init>(XMLSAXHandler.java:152)
	at org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:124)
	at org.geotools.ows.wms.response.WMSGetCapabilitiesResponse.<init>(WMSGetCapabilitiesResponse.java:56)
	at org.geotools.ows.wms.WMS1_0_0$GetCapsRequest.createResponse(WMS1_0_0.java:230)

Current gs-cloud deployments can just add the following env variable or system property (-D...):

GT2_LOGGING_REDIRECTION=JavaLogging

@groldan groldan changed the title Avoid GeoTools loggin redirection to Log4J Avoid GeoTools logging redirection to Log4J Jul 7, 2022
@groldan groldan merged commit 851cf80 into geoserver:main Jul 8, 2022
@groldan groldan deleted the bug/geotools_logging_redirection branch July 8, 2022 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant