Redirecting cout/cerr to System.out/System.err

  • Thread starter william.lichtenberger
  • Start date
W

william.lichtenberger

I have a java application that logs the System.out and System.err
(among other things) to a file.

I'm looking for a way to capture cout statements that are in VC++ dlls
invoked through JNI in the log as well.

If I run the application from a debugger or simply command line, the
cout statements appear in the console. It would seem there would be
some way to pipe them back to java.

I've considered redirecting the output to the same file that the JVM
is writing to, but this seems like it would cause all sorts of other
issues.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top