FYI to other users. Eventually I used a "Callback" from C++ with log
message and appropriate levels to a Java Callback implementation. We used
this method because,
1) easy to implement
2) easy to understand & maintain
3) only one log configuration used for both C++ and Java
4) and all log messages are printed in the order of program execution thus
allowing proper debugging.
Thanks!
On Wed, Feb 4, 2009 at 3:45 PM, Timothy Wall <twal...@dev.java.net> wrote:
a) figure out how to redirect your output streams in C to your desired
output
b) map it to JNA
The easiest would probably be to redirect to a file or a socket, then read
it from Java and spit out to the java logger. how you redirect stdout/cout
depends on your application, though, and not really related to JNA itself.
On Feb 4, 2009, at 3:46 PM, Kunal Shah wrote:
I am working on a C/C++ application which generates tons of logs. I am
looking forward to find a way to specify C/C++ application's 'stdout/printf'
output on a log4j/logger.
I am not looking for a fancy functionality like, debug/info/error. All I
need is a way to turn ON/OFF the logs.
Thanks,
Kunal