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. Does Qt5 have a framework for logging user actions?
QtWS25 Last Chance

Does Qt5 have a framework for logging user actions?

Scheduled Pinned Locked Moved Solved General and Desktop
qt5.4frameworkloggingwindowsdesktop
5 Posts 3 Posters 3.0k Views
  • 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.
  • J Offline
    J Offline
    Jakob
    wrote on 4 Jan 2016, 19:35 last edited by
    #1

    Often when we receive bug reports for our Desktop application, the details as to how to reproduce the problem are, well, not too well explained. So we started thinking that it may be nice to somehow track each keyboard stroke and mouse interaction, in order to 'replay' a situation that triggered a bug.

    Does Qt5 have something builtin to track mouse events and keyboard events and to create a nice log from it?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 4 Jan 2016, 20:21 last edited by
      #2

      Hi
      I have not seen any such build in tools.
      Some event filters combined with a logging framework would make something like that.
      But there would no play back as such. Only info.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 4 Jan 2016, 21:18 last edited by
        #3

        Hi,

        While I can understand the reasoning, the implication of what you are trying to do might be wider than you think. Take for example a user that put the focus back to your application by error and types one of his password… It will sounds like espionage.

        You should rather put tracing information in your application at strategic points and have a switch that allows to activate it. You can use QLoggingCategory for that.

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

        J 1 Reply Last reply 5 Jan 2016, 20:05
        0
        • S SGaist
          4 Jan 2016, 21:18

          Hi,

          While I can understand the reasoning, the implication of what you are trying to do might be wider than you think. Take for example a user that put the focus back to your application by error and types one of his password… It will sounds like espionage.

          You should rather put tracing information in your application at strategic points and have a switch that allows to activate it. You can use QLoggingCategory for that.

          J Offline
          J Offline
          Jakob
          wrote on 5 Jan 2016, 20:05 last edited by
          #4

          @SGaist Thank you for the important warning about possibly unwanted implications.

          I didn't know about 'categorised logging' yet - certainly something to look into. At the same time also very dependent on each of the developers in the team to call this function at each and every appropriate time, with the correct message, which may be very hard to force when under a lot of pressure to create functionality (as our team currently is). As a matter of fact, we currently already have something comparable for more general app logging, but using Boost logging. In practice it turns out these logs are way too sparse to be useful. A more automated approach could make sure we don't overlook an important event, which would be preferable. It is clear though that this shouldn't be done on a low level.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jakob
            wrote on 15 Feb 2016, 13:53 last edited by
            #5

            Since the obvious answer to the question is a resounding 'no', I'll mark this question as 'solved', although I'll still have to think about a way to achieve what we want in the most convenient way.

            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