[Source] annoyance/problem: System.out trapping

Alan Hudson alan at shapeways.com
Mon Aug 20 12:59:24 PDT 2012


On 8/20/2012 12:49 PM, Don Brutzman wrote:
> Annoyance:  every invocation of System.out.print (once captured)
> are prepended with the string "System.out: " which makes console
> output barely readable.
>
> I would only expect such activity when building a new application.
> Is it always occurring?  Problem: this may be why Xj3D console messages
> are typically not found when Xj3D is embedded in another application;
> the output console might be getting intercepted from Xj3D and then
> never handed back to the parent application.
>
> Preferred resolution:  avoid trapping System.out
>
> I believe this is occurring in
> 	org.xj3d.ui.awt.widgets.SwingConsoleWindow.java
> 	redirectSystemMessages()
>
> but did not want to change that due to the possibility of unintended
> side effects.
>
> all the best, Don
this is really not different then something like log4j that puts the 
whole class name into the stream.  Nothing I know of depends on the 
System.out string being there so we could shorten it.  The redirect are 
necessary to put things on console windows instead of the sometimes 
unfindable system console.  We ran into this when running from a bat 
file users couldnt give us bug reports.

-- 
Alan Hudson, Director 3D Tools
www.shapeways.com




More information about the Source mailing list