Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69450

Logging: wrong android log print

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.11.3
    • 5.10.1, 5.11.1
    • Core: Other
    • None
    • Android
    • 3ed8dc37884bac67414c0840e27b5094a69cfdcd

      qSetMessagePattern is not working as it should on Android platform.

      Setting message pattern and calling qInfo.

      qSetMessagePattern("%{appname} : %{message}");
      qInfo() << "TEST MESSAGE!";
      

      Got double log message pattern. With appname, pid, function, message...

      Android:

      07-13 12:46:59.619 I/AppName (28718): ../appname/src/main.cpp:80 (int main(int, char**)): AppName : TEST MESSAGE

      MacOS:

      AppName : TEST MESSAGE
      

      Check qtbase/src/corelib/global/qlogging.cpp\

          __android_log_print(priority, qPrintable(QCoreApplication::applicationName()),
                              "%s:%d (%s): %s\n", context.file, context.line,
                              context.function, qPrintable(formattedMessage));
      

      __android_log_print

      int __android_log_print(
        int prio,
        const char *tag,
        const char *fmt,
        ...
      )
      

        For Gerrit Dashboard: QTBUG-69450
        # Subject Branch Project Status CR V

            lukam Luka Modrić
            lukam Luka Modrić
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes