JNI Wrapper: Implemented logging function.