Re: Using System.out and System.err from ImageJ plugins (Java)
Posted by
Burger Wilhelm on
Feb 18, 2013; 3:42pm
URL: http://imagej.273.s1.nabble.com/Using-System-out-and-System-err-from-ImageJ-plugins-Java-tp5001799p5001803.html
Good to know! -- suppose this would have saved me some troubles ...
Thanks much,
Wilhelm
________________________________________
From: Johannes Schindelin [
[hidden email]]
Sent: Monday, February 18, 2013 16:18
To: Burger Wilhelm
Cc:
[hidden email]
Subject: Re: Using System.out and System.err from ImageJ plugins (Java)
Hi Wilhelm,
On Mon, 18 Feb 2013, Burger Wilhelm wrote:
> I would like to share a piece of Java code for ImageJ that I wrote out
> of need and perhaps others might find useful too:
>
> This small library facilitates the redirection of output to System.out
> and System.err to the ImageJ Log-console. Typically in ImageJ output
> sent to the standard system streams by calls such as
> System.out.println(...) are suppressed. Redirecting the standard output
> streams makes this output appear in ImageJ's log console, analogous to
> using the IJ.log() method. This is particularly useful for debugging
> imported code and for writing classes that are independent of ImageJ.
Note that Fiji writes stdout and stderr to the ImageJ Log window in
addition to the console (if there is one) if you switch on debug mode via
Edit>Options>Misc...
Ciao,
Johannes
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html