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

Logging: wrong android log print

    XMLWordPrintable

Details

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

    Description

      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,
        ...
      )
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes