-
Notifications
You must be signed in to change notification settings - Fork 106
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
Partially revert "Enable application log" to "Log to file" #2118
Partially revert "Enable application log" to "Log to file" #2118
Conversation
src/main.cc
Outdated
// Install message handler | ||
qInstallMessageHandler( gdMessageHandler ); | ||
// Log to file enabled through command line or preference | ||
if ( gdcl.logFile || cfg.preferences.enableApplicationLog ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If user set the option () through the preference , this line will never get the chance to run.
eg:
cfg.preferences.enableApplicationLog=false
,
then user set it through preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes?
If the option is not enabled, the default message handler will be working (printing to stdio/console).
If the option is enabled, the custom message handler that prints to gd_log.txt will starts to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logFilePtr is useless if the option is not enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which means the option in the preference will only work in the next time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I know what you mean now, and I have decided to move this thing out of main.cc
b6587ec
to
ad244b7
Compare
3bca7bb
to
a281895
Compare
59ab7a1
to
657b886
Compare
|
ok, seems introduced by me. :( |
Partially revert #2097
Problem: This is only useful for Windows where
Console
is a none-trivial thing for the user to use.But for Linux, users are generally knows how to use terminal, and app writing messages to
stdio
is common.The change in #2097 effectively disabled logging in terminal by default, which is confusing to Linux users.