-
Notifications
You must be signed in to change notification settings - Fork 0
Logging
Milan edited this page Feb 5, 2021
·
1 revision
The following page assumes knowledge of the Python programming language.
It's a good idea to log information you believe is important that can aid with debugging, particularly warnings and errors.
To do this, make sure to import the __globals__ module.
from src import __globals__You'll also want to import the settings module.
from src import settingsTo log a warning, add the following code:
if settings.do_logs:
__globals__.logger.warn('This is a warning message')You can also log errors, along with other logging levels.
FreeRGB | License | Code of Conduct | Contributing | Wiki | Code