Skip to content
Permalink
Browse files

Print messages from QgsMessageLog to the console when testing

  • Loading branch information
m-kuhn committed Jan 19, 2017
1 parent 534cb9e commit eb7a235dc1835edda705fa336ab7cfe3f5847463
Showing with 5 additions and 0 deletions.
  1. +5 −0 python/testing/__init__.py
@@ -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

0 comments on commit eb7a235

Please sign in to comment.
You can’t perform that action at this time.