LandSurveyCodesImport.toolbelt.log_handler module#
QGIS plugin logic.
- class LandSurveyCodesImport.toolbelt.log_handler.PlgLogger(level=0)[source]#
Bases:
logging.Handler
Python logging handler supercharged with QGIS useful methods.
- static log(message: str, application: str = 'Land Survey Codes Import', log_level: int = 0, push: bool = False)[source]#
Send messages to QGIS messages windows and to the user as a message bar. Plugin name is used as title.
- Parameters
message (str) – message to display
application (str, optional) – name of the application sending the message. Defaults to __about__.__title__
log_level (int, optional) – message level. Possible values: 0 (info), 1 (warning), 2 (critical), 3 (success), 4 (none - grey). Defaults to 0 (info)
push (bool, optional) – also display the message in the QGIS message bar in addition to the log, defaults to False
- Example
log(message="Plugin loaded - INFO", log_level=0, push=1) log(message="Plugin loaded - WARNING", log_level=1, push=1) log(message="Plugin loaded - ERROR", log_level=2, push=1) log(message="Plugin loaded - SUCCESS", log_level=3, push=1) log(message="Plugin loaded - TEST", log_level=4, push=1)