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

Use python logging instead of env variable #289

Open
dekekincaid opened this issue May 22, 2018 · 1 comment
Open

Use python logging instead of env variable #289

dekekincaid opened this issue May 22, 2018 · 1 comment

Comments

@dekekincaid
Copy link

I was curious if you guys thought of just using proper python logging instead of the QT_VERBOSE environment variable? Then it is a bit easier to control things like this at a global level. Especially for things like on renderfarms, etc.. where you can just switch logging to different levels for all software rather then needing per tool env variables to turn on/off logging.

@mottosso
Copy link
Owner

Good idea.

My preference would be having QT_VERBOSE be the default level for the logger, and any logging messages using that logger. That way, you can still configure it at the process-level, and also during run-time.

E.g.

import logging

log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG if QT_VERBOSE else logging.INFO)
...

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

No branches or pull requests

2 participants