Closed omix closed 1 year ago
This feature is available in next release QtJambi 6.5.1.
You may activate method logs by using JVM call parameter -Dio.qt.enable-method-logs=true
. This works in both, release and debug build.
QtJambi will log to qDebug()
whenever entering and leaving a method as well as further internal states. These messages are logged with different logging categories:
io.qtjambi.debugapi.native-calls
- a native Qt method is called by Javaio.qtjambi.debugapi.java-overloads
- an overloading Java method is called by Qtio.qtjambi.debugapi.internal
- QtJambi internal methods are calledio.qtjambi.debugapi
- Further internal messages
You can use category filters to reduce the output (see here). If you use Java logging for output be aware that QtDebugMsg
corresponds to logging level FINEST
. When using Java logging you may want to filter method logs by following configuration:io.qtjambi.debugapi.level=OFF
io.qtjambi.debugapi.native-calls.level=OFF
io.qtjambi.debugapi.java-overloads.level=OFF
io.qtjambi.debugapi.internal.level=OFF
ENTER: Java calling native method QCoreApplication::applicationName() in thread tid=12345
LEAVE: Java calling native method QCoreApplication::applicationName() in thread tid=12345
ENTER: Java calling native method QEvent::QEvent(QEvent::Type) in thread tid=12345
ENTER: Java calling native method construct QEvent(QEvent::Type) in thread tid=12345
ENTER: Constructor call QEvent::QEvent_shell(QEvent::Type type0) on object 0x16328011420 in thread tid=12345
LEAVE: Constructor call QEvent::QEvent_shell(QEvent::Type type0) on object 0x16328011420 in thread tid=12345
LEAVE: Java calling native method construct QEvent(QEvent::Type) in thread tid=12345
LEAVE: Java calling native method QEvent::QEvent(QEvent::Type) in thread tid=12345
ENTER: Shell (object: 0x1632800eea0) calling java method QObject::event(QEvent*) in thread tid=12345
LEAVE: Shell (object: 0x1632800eea0) calling java method QObject::event(QEvent*) in thread tid=12345
ENTER: QtJambiLink::releaseJavaObject(JNIEnv *env) on object 0x16327e2f750 in thread tid=12345
LEAVE: QtJambiLink::releaseJavaObject(JNIEnv *env) on object 0x16327e2f750 in thread tid=12345
call destructor_function on object 0x7ff8039d76b8 in thread tid=12345
The QTJAMBI_DEBUG_TRACE feature is one of the oldest in QtJambi and needs to be revised:
printf