[Kleopatra] Add support of timestamp to logging

Authored by andreylegayev on Apr 4 2020, 12:25 PM.

Description

[Kleopatra] Add support of timestamp to logging

Summary:
Sometimes Kleopatra starts very slow on windows and get stuck sometimes.
Current version doesn't write timestamps to log file and it's hard to understand what exactly operation is slowing it down.
I've implented writing timestamp before message.
New feature can be enabled via setting environment variable KLEOPATRA_LOGOPTIONS=timestamp

Test Plan:

  1. Enable logs by setting environment variable KLEOPATRA_LOGDIR=/your/log/path
  2. Enable debug logs output by setting QT_LOGGING_RULES="org.kde.pim.kleopatra.debug=true"
  3. Set environment variable QT_MESSAGE_PATTERN="%{time yyyyMMdd h:mm:ss.zzz} %{message}"
  4. Check logs - timestamp should appear before log messages

Reviewers: aheinecke, dfaure

Reviewed By: dfaure

Subscribers: knauss, kde-pim

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D28495

Details

Committed
knaussApr 4 2020, 2:46 PM
Reviewer
dfaure
Differential Revision
D28495: [Kleopatra] Add support of timestamp to logging
Parents
R168:8cc12d038996: Qt 5.15 undeprecated QComboBox::currentIndexChanged(int)
Branches
Unknown
Tags
Unknown