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

[Android]console.log() output gets trimmed to 1000 characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.15.2, 5.15.3
    • Extras: Android
    • None
    • Android

    Description

      On Android starting with Qt 5.15.2 there seems to be a limit on how long is the string you want to output via console.log or qDebug(). This doesn't happen on any other platform. 

      import QtQuick 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Component.onCompleted: {
              let array=[];
              for( let i=0; i<1000; i++)array.push(i);
              let array_Str=JSON.stringify(array);
      
              console.log("{ Length:",array_Str.length,"}");
              console.log("{ Array:",array_Str,"}");
              console.log(JSON.parse(array_Str)[990]);
          }
      }
      
      

      The string that is supposed to be logged does have the right length, the data is still there, but it just doesn't get outputted. console.log("{ Array:",array_Str,"}") is trimmed after 1000 characters. I think this might be related to some configuration options regarding Android.

      Attachments

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

        Activity

          People

            qtandroidteam Qt Android Team
            adrian.gabureanu Adrian Gabureanu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes