Redirecting std.* to a file Follow
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
Please sign in to leave a comment.
System.setOut and System.setErr
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.
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!"
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.
That's the only explanation of why it does't work I can think of
I'm not suggesting that setErr and setOut are broken. I'm merely saying that they don't work in my particular situation.
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 :)