[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:
- Enable logs by setting environment variable KLEOPATRA_LOGDIR=/your/log/path
- Enable debug logs output by setting QT_LOGGING_RULES="org.kde.pim.kleopatra.debug=true"
- Set environment variable QT_MESSAGE_PATTERN="%{time yyyyMMdd h:mm:ss.zzz} %{message}"
- 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