I call some C code via JNI from JAVA.
In my C, I do multiple printf that I want to log with log4j.
printf("Could not find HID device\n");
fflush(stdout);
They show up fine in the Eclipse console, with log4j I redirect the stdout to my logger :
System.setOut(new PrintStream(new OutputStreamLogger(log, Priority.DEBUG), true));
When I call "System.out.println", it's written to my log file.
But the JNI printfs don't.
Aren't they in the stdout ?
How can I put them in my logfile ?