Redirecting std.* to a file

Hi,

Is there a way I can redirect std.err and std.out from the console to a file? I need to run my code with -Djava.security.debug=all and the ammount of output this option generates kills IDEA.


Dmitry

6 comments
Comment actions Permalink


System.setOut and System.setErr


0
Comment actions Permalink

I wish it were that simple :)) No, these will not work because debugging for the core classes is initialized way before my classes get loaded. I really need to be able to redirect IDEA's console stream to a file.

0
Comment actions Permalink

Irida EAP builds have new feature that limits amount of the output in the
IDEA console. Check out Settings|General|Use cyclic buffer...
-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

I wish it were that simple :)) No, these will not work because
debugging for the core classes is initialized way before my classes
get loaded. I really need to be able to redirect IDEA's console
stream to a file.



0
Comment actions Permalink

DB> I wish it were that simple :)) No, these will not work because
DB> debugging for the core classes is initialized way before my classes
DB> get loaded.

And? Do any of the core classes cache System.out or System.err?

DB> I really need to be able to redirect IDEA's console
DB> stream to a file.

I redirect System.out and System.err to two jtextareas and it works while
running and debugging, i.e: no output in idea console, all output goes to
the textareas. Haven't tried writing to a file, but there should be no difference.


0
Comment actions Permalink

And? Do any of the core classes cache System.out or System.err?


That's the only explanation of why it does't work I can think of

I redirect System.out and System.err to two jtextareas and it works while


I'm not suggesting that setErr and setOut are broken. I'm merely saying that they don't work in my particular situation.

0
Comment actions Permalink

DB> I'm not suggesting that setErr and setOut are broken. I'm merely
DB> saying that they don't work in my particular situation.

Your situation is very different than mine then :) Just tested running my
program with -Djava.security.debug=all and all the security output goes to
the redirected System.err.

As all the security events that I see in the redirected System.err are about
opening jars, this isn't a very extensive test :)


0

Please sign in to leave a comment.