Logging uniformly across Java and native code...
1 posts in topic
Flat View  Flat View

Posted By:   Somesh_Marepalli
Posted On:   Wednesday, August 6, 2003 01:09 PM

what's a good way to log an application that has extensive Java classes / C++ classes interaction (native code thru JNI)...is there a way, a common log file can be maintained without much overhead

Re: Logging uniformly across Java and native code...

Posted By:   Alexander_Krapf  
Posted On:   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.

Good luck,


About | Sitemap | Contact