Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Print messages from QgsMessageLog to the console when testing
  • Loading branch information
m-kuhn committed Jan 19, 2017
1 parent 534cb9e commit eb7a235
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/testing/__init__.py
Expand Up @@ -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

Expand Down

0 comments on commit eb7a235

Please sign in to comment.