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

Added debug log option in GUI for debug builds #7994

Open
wants to merge 2 commits into
base: master
from

Conversation

5 participants
@faxx1080
Copy link

faxx1080 commented Apr 13, 2019

I didn't see an option in the debugger UI to keep debug logs on. This adds it, and marks 'Debug' as disabled if the DEBUG level log isn't compiled in (like in release builds).

@jordan-woyak

This comment has been minimized.

Copy link
Member

jordan-woyak commented Apr 13, 2019

@JosJuice

This comment has been minimized.

Copy link
Contributor

JosJuice commented Apr 13, 2019

I'd rather have the debug option be invisible when you're using a release build. (That's how DolphinWK worked, right?)

@jordan-woyak

This comment has been minimized.

Copy link
Member

jordan-woyak commented Apr 13, 2019

I can't decide if I'd want it disabled or invisible. Either way could cause different confusion. I guess invisible would cause less confusion. ..Unless we had a tooltip that said DEBUG level requires dolphin to built in Debug mode.

@@ -47,6 +47,8 @@ void LogConfigWidget::CreateWidgets()
m_verbosity_error = new QRadioButton(tr("Error"));
m_verbosity_warning = new QRadioButton(tr("Warning"));
m_verbosity_info = new QRadioButton(tr("Info"));
m_verbosity_debug = new QRadioButton(tr("Debug"));
m_verbosity_debug->setDisabled(MAX_LOGLEVEL < 5);

This comment has been minimized.

Copy link
@BhaaLseN

BhaaLseN Apr 13, 2019

Member

Whatever this ends up being in the end, could you please use LDEBUG instead of 5 there?

@faxx1080

This comment has been minimized.

Copy link
Author

faxx1080 commented Apr 13, 2019

I made the button invisible & took @BhaaLseN's advice.

@@ -136,6 +142,7 @@ void LogConfigWidget::LoadSettings()
m_verbosity_error->setChecked(verbosity == 2);
m_verbosity_warning->setChecked(verbosity == 3);
m_verbosity_info->setChecked(verbosity == 4);
m_verbosity_debug->setChecked(verbosity == 5);

This comment has been minimized.

Copy link
@stenzek

stenzek Apr 21, 2019

Contributor

These could be replaced with verbosity == LogTypes::LDEBUG, verbosity == LogTypes::LINFO, etc. I know it's in the existing code, but may as well clean it up while you're changing it.

@@ -179,6 +186,9 @@ void LogConfigWidget::SaveSettings()
if (m_verbosity_info->isChecked())
verbosity = 4;

if (m_verbosity_debug->isChecked())
verbosity = 5;

This comment has been minimized.

Copy link
@stenzek

stenzek Apr 21, 2019

Contributor

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.