mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Print messages from QgsMessageLog to the console when testing
This commit is contained in:
parent
534cb9e738
commit
eb7a235dc1
@ -273,6 +273,11 @@ def start_app(cleanup=True):
|
||||
QGISAPP.initQgis()
|
||||
print(QGISAPP.showSettings())
|
||||
|
||||
def debug_log_message(message, tag, level):
|
||||
print('{}({}): {}'.format(tag, level, message))
|
||||
|
||||
QgsApplication.instance().messageLog().messageReceived.connect(debug_log_message)
|
||||
|
||||
if cleanup:
|
||||
import atexit
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user