Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor logging #176

Merged
merged 6 commits into from
Jul 26, 2021
Merged

Refactor logging #176

merged 6 commits into from
Jul 26, 2021

Conversation

pktiuk
Copy link
Member

@pktiuk pktiuk commented Jul 5, 2021

Fixes some logging issues:

  • there are multiple ways of logging (qDebug and Logger::LogDebug)
  • Logs are not readable (don't show location or time)
  • calling qInstallMessageHandler in every method is a bad idea, it should be called only ONCE

Part of #177

@pktiuk pktiuk marked this pull request as draft July 5, 2021 16:38
@pktiuk pktiuk force-pushed the refactor_logging branch from 6497bc4 to 0e4b61e Compare July 5, 2021 16:39
Copy link
Member Author

@pktiuk pktiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my favorite commit.

@@ -276,8 +248,6 @@ void Logger::appendLog(LogLevel level, const QString &message, bool newline)
*/
void Logger::directLog(LogLevel level, const QString &message, bool newline)
Copy link
Member Author

@pktiuk pktiuk Jul 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jsbackus,

Could you help me with this one?

Do you remember what was the reason of differentiating between directLog and appendLog?
Were there any performance issues with logs causing these optimizations?

@jsbackus
Copy link
Contributor

jsbackus commented Jul 12, 2021 via email

@pktiuk pktiuk marked this pull request as ready for review July 26, 2021 19:36
@pktiuk pktiuk merged commit be74952 into master Jul 26, 2021
@pktiuk pktiuk deleted the refactor_logging branch July 26, 2021 19:39
@pktiuk
Copy link
Member Author

pktiuk commented Jul 26, 2021

This task is too big to do it at once.

It will be more manageable if it would be split to pieces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants