Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to disable log messages in Application Output of Qt Creator?
Qt 6.11 is out! See what's new in the release blog

How to disable log messages in Application Output of Qt Creator?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DiracsbracketD Offline
    DiracsbracketD Offline
    Diracsbracket
    wrote on last edited by Diracsbracket
    #1

    Hi
    I would like to disable all the system logging messages (the W, D, E, I, V lines ) in the Application Output window of Qt Creator when uploading/running my Android application via Qt Creator.

    For example, every time I touch the screen I get output such as the following:

    D ViewRootImpl@2c0ffcc[QtActivity]: ViewPostImeInputStage processPointer 1
    D ViewRootImpl@2c0ffcc[QtActivity]: ViewPostImeInputStage processPointer 0
    

    and I would like get rid of these and the many other messages.

    As per http://doc.qt.io/qt-5/qloggingcategory.html, I tried adding at the top my of main() entry point:

    QLoggingCategory::setFilterRules("*.debug=false\n"
                                         "*.warning=false\n"
                                         "*.info=false");
    

    However, this does not have the effect desired, and I still see all the W, D, E, I, V log messages. I suppose the above rules are for logging to file rather than to the terminal.

    How can I disable those terminal logging messages then?
    Thanks!

    C 1 Reply Last reply
    0
    • DiracsbracketD Diracsbracket

      Hi
      I would like to disable all the system logging messages (the W, D, E, I, V lines ) in the Application Output window of Qt Creator when uploading/running my Android application via Qt Creator.

      For example, every time I touch the screen I get output such as the following:

      D ViewRootImpl@2c0ffcc[QtActivity]: ViewPostImeInputStage processPointer 1
      D ViewRootImpl@2c0ffcc[QtActivity]: ViewPostImeInputStage processPointer 0
      

      and I would like get rid of these and the many other messages.

      As per http://doc.qt.io/qt-5/qloggingcategory.html, I tried adding at the top my of main() entry point:

      QLoggingCategory::setFilterRules("*.debug=false\n"
                                           "*.warning=false\n"
                                           "*.info=false");
      

      However, this does not have the effect desired, and I still see all the W, D, E, I, V log messages. I suppose the above rules are for logging to file rather than to the terminal.

      How can I disable those terminal logging messages then?
      Thanks!

      C Offline
      C Offline
      Claoo
      wrote on last edited by
      #2

      @Diracsbracket I have the same problem did you solve it? I want to stop Application Output I want to log only in files.

      SGaistS 1 Reply Last reply
      0
      • C Claoo

        @Diracsbracket I have the same problem did you solve it? I want to stop Application Output I want to log only in files.

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by SGaist
        #3

        @Claoo Hi and welcome to devnet,

        Since you want to put the output in a file, install a custom message handler and do that in there.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        C 1 Reply Last reply
        0
        • SGaistS SGaist

          @Claoo Hi and welcome to devnet,

          Since you want to put the output in a file, install a custom message handler and do that in there.

          C Offline
          C Offline
          Claoo
          wrote on last edited by
          #4

          @SGaist Hi I did that and works great, but I don't know how to disable the logging from Application Output. I want the output to be only in the files I want and not in Application Output, at this moment my app is logging in files and in Application Output. Thx!

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Not knowing what you implemented I can't answer to that issue.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved