Redirect JNI C stderr / stdout to System.stdout and System.stderr
843829Feb 20 2008 — edited Feb 20 2008We use log4j in java to log everything output to stdout and stderr - however, we also have a JNI DLL which writes to the C stderr/stdout. These are not caught by log4j and just get output to the console.
Is there any way to force a C call to printf("...") to go through the standard Java streams? Most of the calls are actually to fprintf(stdout, "..."), so if I can use a file that would also be acceptable.
Thanks in advance,
Bob