Bad System.out.println logging usage

Description

The xslt extension uses System.out.println() to print debugging info instead of properly using geoserver logging, which can uselessly fill out catalina.out.

While i can understand system.out.println() being used in tests, it shouldn't appear in production code..
https://github.com/geoserver/geoserver/blob/master/src/extension/xslt/src/main/java/org/geoserver/wfs/xslt/XSLTOutputFormat.java#L83 is trigerred quite often here, and https://github.com/geoserver/geoserver/blob/master/src/extension/xslt/src/main/java/org/geoserver/wfs/xslt/XSLTOutputFormat.java#L95 happens too.

https://github.com/geoserver/geoserver/search?utf8=%E2%9C%93&q=%22System.out.println%22&type=Code

Environment

Tomcat 8, debian jessie

Activity

Show:
Andrea Aime
February 15, 2017, 11:48 AM

Mass closing all resolved issues not modified in the last 4 weeks

Landry Breuil
March 14, 2016, 4:07 PM

And if possible if it can be backported to 2.8... would be nice

Landry Breuil
March 14, 2016, 4:06 PM

https://github.com/geoserver/geoserver/pull/1529 should do the trick, compile-tested fine here. I only did the ones where a logger instance was accessible in the context, so some out.println calls are still around..

Andrea Aime
March 14, 2016, 10:04 AM

Yep, fully agreed that should be turned into logging statements.
If it's of any urgency, pull request welcomed, here are the guidelines: https://github.com/geoserver/geoserver/blob/master/CONTRIBUTING.md

Fixed

Assignee

Unassigned

Reporter

Landry Breuil

Fix versions

Affects versions