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

categorized log output on iOS has line breaks in random places

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.5.3, dev
    • Core: I/O
    • None

    Description

      See attached. It was generated by doing this in main.cpp:

      int main(int argc, char *argv[])
      {
          QLoggingCategory::setFilterRules(QStringLiteral("qt.*=true"));
      //    QLoggingCategory("qt.qpa.input.events").setEnabled(QtDebugMsg, true);
          QLoggingCategory("qt.pointer.dispatch").setEnabled(QtDebugMsg, true);
          QLoggingCategory("qt.pointer.grab").setEnabled(QtDebugMsg, true);
      //    QLoggingCategory("qt.quick.touch").setEnabled(QtDebugMsg, true);
          QLoggingCategory("qt.quick.touch.target").setEnabled(QtDebugMsg, true);
      //    QLoggingCategory("qt.quick.pointer.localization").setEnabled(QtDebugMsg, true);
      //    QLoggingCategory("qt.quick.touch").setEnabled(QtDebugMsg, true);
      //    QLoggingCategory("qt.quick.touch.target").setEnabled(QtDebugMsg, true);
          qSetMessagePattern("%{appname} [%{time process}] %{category} %{function} - %{message}");
      
          QGuiApplication app(argc, argv);
      ...
      

      The filter rules don't seem to allow for multiple rules to turn on specific categories either, the way that the QT_LOGGING_RULES env var does; but that's another bug... thus all the flailing around with setEnabled() which also doesn't seem to work as expected (perhaps after enabling everything, I could only use it to turn off some of them? But I cannot use setEnabled() to turn on one category at a time, it seems.)

      Anyway what this bug is about is that to get log output, I run an app in Creator and copy the categorized log output from the output pane. The random line breaks are there in that pane, which makes it hard to grep for specific sequences of things, because grep will miss the broken lines either partially or completely depending where the line break was. It behaves as if there's a buffer somewhere that is accumulating the log output, and it gets flushed only when it's full, and an extra line break is added at the end. Or something like that.

      Attachments

        Issue Links

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

          Activity

            People

              kkohne Kai Köhne
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes