Module qtjambi
Package io.qt.core

Class QLogging

java.lang.Object
io.qt.core.QLogging

public final class QLogging extends Object

Java wrapper for Qt's logging functionality.

See Also:
  • Method Details

    • qInstallMessageHandler

      @QtUninvokable public static QtMessageHandler qInstallMessageHandler(QtMessageHandler handler, QtMsgType... supportedMessageTypes)

      Installs the specified message handler as a receiver for message notification.

      Optionally, you can specify all message types treated by the handler to improve performance. All message types not specified here remain hidden. Without specifying any message type here, all message types are sent to the handler.

      See Also:
    • qInstallExceptionMessageHandler

      @QtUninvokable public static QtMessageHandler qInstallExceptionMessageHandler(QtMsgType... supportedMessageTypes)

      Installs an exception-throwing message handler as a receiver for message notification.

      Optionally, you can specify all message types treated by the handler to improve performance. All message types not specified here remain hidden. Without specifying any message type here, all message types are sent to the handler.

      Alternatively, you can use the following Java VM argument to let QtJambi install an exception-throwing message handler:

      -Dio.qt.exceptions-for-messages=TYPE

      where TYPE is either ALL or a combination of CRITICAL, DEBUG, FATAL, WARNING and INFO.

      See Also:
    • qInstallLoggingMessageHandler

      @QtUninvokable public static QtMessageHandler qInstallLoggingMessageHandler(QtMsgType... supportedMessageTypes)

      Installs a message handler using the Java logging feature as a receiver for message notification.

      Optionally, you can specify all message types treated by the handler to improve performance. All message types not specified here remain hidden. Without specifying any message type here, all message types are sent to the handler.

      Alternatively, you can use the following Java VM argument to let QtJambi install a Java logging message handler:

      -Dio.qt.log-messages=TYPE

      where TYPE is either ALL or a combination of CRITICAL, DEBUG, FATAL, WARNING and INFO.

      See Also:
    • qWarning

      @QtUninvokable public static void qWarning(String message)
      Calls the message handler with the warning message.
      Parameters:
      message -
    • qWarning

      @QtUninvokable public static void qWarning(String message, Object... args)
      Calls the message handler with the warning message and arguments.
      Parameters:
      message -
      args -
      See Also:
    • qSetMessagePattern

      @QtUninvokable public static void qSetMessagePattern(String pattern)
      Changes the output of the default message handler.
    • qFormatLogMessage

      @QtUninvokable public static String qFormatLogMessage(QtMsgType type, QMessageLogContext context, String str)
    • qErrnoWarning

      @QtUninvokable public static void qErrnoWarning(String message, Object... args)
    • qErrnoWarning

      @QtUninvokable public static void qErrnoWarning(int code, String message, Object... args)
    • qDebug

      @QtUninvokable public static void qDebug(String message)
      Calls the message handler with the debug message.
      Parameters:
      message -
    • qDebug

      @QtUninvokable public static void qDebug(String message, Object... args)
      Calls the message handler with the debug message and arguments.
      Parameters:
      message -
      args -
      See Also:
    • qInfo

      @QtUninvokable public static void qInfo(String message)
      Calls the message handler with the info message.
      Parameters:
      message -
    • qInfo

      @QtUninvokable public static void qInfo(String message, Object... args)
      Calls the message handler with the info message and arguments.
      Parameters:
      message -
      args -
      See Also:
    • qCritical

      @QtUninvokable public static void qCritical(String message)
      Calls the message handler with the critical message.
      Parameters:
      message -
    • qCritical

      @QtUninvokable public static void qCritical(String message, Object... args)
      Calls the message handler with the critical message and arguments.
      Parameters:
      message -
      args -
      See Also:
    • qFatal

      @QtUninvokable public static void qFatal(String message)
      Calls the message handler with the fatal message. If you are using the default message handler this function will abort to create a core dump.
      Parameters:
      message -
    • qFatal

      @QtUninvokable public static void qFatal(String message, Object... args)
      Calls the message handler with the fatal message and arguments.
      Parameters:
      message -
      args -
      See Also:
    • qCWarning

      @QtUninvokable public static void qCWarning(QLoggingCategory category, String message)
      Logs a warning message in the logging category.
      Parameters:
      category -
      message -
    • qCWarning

      @QtUninvokable public static void qCWarning(QLoggingCategory category, String message, Object... args)
      Logs a warning message with arguments in the logging category.
      Parameters:
      category -
      message -
      args -
    • qCDebug

      @QtUninvokable public static void qCDebug(QLoggingCategory category, String message)
      Logs a debug message in the logging category.
      Parameters:
      category -
      message -
    • qCDebug

      @QtUninvokable public static void qCDebug(QLoggingCategory category, String message, Object... args)
      Logs a debug message with arguments in the logging category.
      Parameters:
      category -
      message -
      args -
    • qCInfo

      @QtUninvokable public static void qCInfo(QLoggingCategory category, String message)
      Logs an info message in the logging category.
      Parameters:
      category -
      message -
    • qCInfo

      @QtUninvokable public static void qCInfo(QLoggingCategory category, String message, Object... args)
      Logs an info message with arguments in the logging category.
      Parameters:
      category -
      message -
      args -
    • qCCritical

      @QtUninvokable public static void qCCritical(QLoggingCategory category, String message)
      Logs a critical message in the logging category.
      Parameters:
      category -
      message -
    • qCCritical

      @QtUninvokable public static void qCCritical(QLoggingCategory category, String message, Object... args)
      Logs a critical message with arguments in the logging category.
      Parameters:
      category -
      message -
      args -
    • qWarning

      @QtUninvokable public static void qWarning(Supplier<String> message)
      Calls the message handler with the warning message provided by Supplier.
      Parameters:
      message -
    • qDebug

      @QtUninvokable public static void qDebug(Supplier<String> message)
      Calls the message handler with the debug message provided by Supplier.
      Parameters:
      message -
    • qInfo

      @QtUninvokable public static void qInfo(Supplier<String> message)
      Calls the message handler with the info message provided by Supplier.
      Parameters:
      message -
    • qCritical

      @QtUninvokable public static void qCritical(Supplier<String> message)
      Calls the message handler with the critical message provided by Supplier.
      Parameters:
      message -
    • qFatal

      @QtUninvokable public static void qFatal(Supplier<String> message)
      Calls the message handler with the fatal message provided by Supplier. If you are using the default message handler this function will abort to create a core dump.
      Parameters:
      message -
    • qCWarning

      @QtUninvokable public static void qCWarning(QLoggingCategory category, Supplier<String> message)
      Logs a warning message provided by Supplier in the logging category.
      Parameters:
      category -
      message -
    • qCDebug

      @QtUninvokable public static void qCDebug(QLoggingCategory category, Supplier<String> message)
      Logs a debug message provided by Supplier in the logging category.
      Parameters:
      category -
      message -
    • qCInfo

      @QtUninvokable public static void qCInfo(QLoggingCategory category, Supplier<String> message)
      Logs a info message provided by Supplier in the logging category.
      Parameters:
      category -
      message -
    • qCCritical

      @QtUninvokable public static void qCCritical(QLoggingCategory category, Supplier<String> message)
      Logs a critical message provided by Supplier in the logging category.
      Parameters:
      category -
      message -
    • qWarning

      @QtUninvokable public static QDebug qWarning()
      Logs a warning message using a QDebug stream
      Returns:
      QDebug stream
    • qDebug

      @QtUninvokable public static QDebug qDebug()
      Logs a debug message using a QDebug stream
      Returns:
      QDebug stream
    • qInfo

      @QtUninvokable public static QDebug qInfo()
      Logs an info message using a QDebug stream
      Returns:
      QDebug stream
    • qCritical

      @QtUninvokable public static QDebug qCritical()
      Logs a critical message using a QDebug stream
      Returns:
      QDebug stream
    • qCWarning

      @QtUninvokable public static QDebug qCWarning(QLoggingCategory category)
      Logs a warning message into given category using a QDebug stream
      Parameters:
      category -
      Returns:
      QDebug stream
    • qCDebug

      @QtUninvokable public static QDebug qCDebug(QLoggingCategory category)
      Logs a debug message into given category using a QDebug stream
      Parameters:
      category -
      Returns:
      QDebug stream
    • qCInfo

      @QtUninvokable public static QDebug qCInfo(QLoggingCategory category)
      Logs an info message into given category using a QDebug stream
      Parameters:
      category -
      Returns:
      QDebug stream
    • qCCritical

      @QtUninvokable public static QDebug qCCritical(QLoggingCategory category)
      Logs a critical message into given category using a QDebug stream
      Parameters:
      category -
      Returns:
      QDebug stream