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

qSetMessagePattern %{time process}, %{time boot}, and %{time [format]} can not be combined

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.1
    • 5.6.0
    • Core: Other
    • None
    • 705d29585b9a006b2fc8dd77ebf7a67b3670011b

    Description

      When using a message pattern

      qSetMessagePattern("%{time boot}");
      

      the output is

      2184.580
      

      When using a message pattern

      qSetMessagePattern("%{time process}");
      

      the output is

      0.000
      

      (the process was very early at the debug output...)

      When using a message pattern

      qSetMessagePattern("%{time yyyy-MM-ddThh:mm:ss.zzz}");
      

      the output is

      2016-03-17T22:20:22.729
      

      This is all good.

      But when you want to combine the output to have all three times in one line:

      qSetMessagePattern("%{time process} | %{time boot} | %{time yyyy-MM-ddThh:mm:ss.zzz}");
      

      you get

      2016-03-17T22:24:45.275|2016-03-17T22:24:45.276|2016-03-17T22:24:45.276
      

      So the last "time" pattern somehow overwrite the other formatting.

      To better separate this maybe you should introduce

      %{time_process}
      %{time_boot}
      

      Is there a chance to get even

      %{time_process_user}
      %{time_process_system}
      

      ?

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            moellney Michael Möllney
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes