Home GnuPG

[Kleopatra] Add support of timestamp to logging

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

Provenance
andrey_lAuthored on Apr 4 2020, 2:25 PM
hefeeCommitted on Apr 4 2020, 4:46 PM
Parents
rKLEOPATRA8cc12d038996: Qt 5.15 undeprecated QComboBox::currentIndexChanged(int)
Branches
Unknown
Tags
Unknown