As for the presence of debugging code, there is some writing to System.err in 
AbstractWFSStrategy, and GmlGetFeatureResponseParserFactory as well, although 
that obeys the logging level at least.

In my case, I found it useful to see the requests and responses going back and 
forth, it’s just not nice to write straight to System.out or System.err. I can 
however see that sending the responses, and possibly some requests, to the 
logger might not be as easy, if for no other reason, then at least because of 
their possibly huge size.


Tor Egil Strand


From: Jody Garnett [mailto:jody.garn...@gmail.com] 
Sent: Wednesday, August 13, 2014 6:10 PM
To: Tor Egil Strand
Cc: geotools-gt2-users@lists.sourceforge.net
Subject: Re: [Geotools-gt2-users] WFS-NG closing System.out

Thanks for testing Tor, managed to report the bug to Jira for you: 
https://jira.codehaus.org/browse/GEOT-4872

Any and all testing on 12-beta is super useful - as the RC1 goes out next week!



Jody Garnett

On Wed, Aug 13, 2014 at 2:06 AM, Tor Egil Strand 
<tor.egil.str...@kartverket.no> wrote:
Hi

I have been trying out the new WFS-NG in 12-beta to see if it works better than 
the old WFS module. While doing so, I suddenly had troubles printing to 
standard out. It turns out that not only does WFS-NG print requests and 
responses straight to System.out and System.err without going through the 
logging framework, it also closes System.out after doing so. The offender seems 
to be org.geotools.data.wfs.internal.DescribeFeatureTypeResponse. The 
TeeOutputStream used to write a copy of the response to System.out closes both 
streams when it is closed, not just the original output as I think is intended. 
Even if WFS-NG isn't considered stable yet, closing System.out is a rather 
nasty thing to do.


Regards

Tor Egil Riegels Strand
Developer
Direct: +47 32 11 81 61
E-mail: tor.egil.str...@kartverket.no

Switchboard: +47 32 11 83 00
www.kartverket.no

------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to