Monday, October 13, 2003 03:36 PM
It really depends on your logging requirements. Java comes with excellent built-in logging capabilities and ubiquitous third-party logging packages. If you primarily develop in Java and only parts in native code, then you should use these packages and write some "C" utility methods that call into them from your native code.
If you do more "C", C++ development and have yor own logging libraries, you might want to natively implement a Java wrapper for use by your Java apps.
JNI poses very little overhead and can be used for this type of integration in either direction.
If you're going to wrap Java in C++, you might want to investigate JunC++ion, a tool which does this quickly and easily for you.