Created
October 29, 2018 08:56
-
-
Save ndufrane/a625dc823ee77b0f44753fbfbf242d56 to your computer and use it in GitHub Desktop.
QGIS 3 Log errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filename = 'c:\\Users\\ndufrane\qgis.log' | |
def write_log_message(message, tag, level): | |
with open(filename, 'a') as logfile: | |
logfile.write('{tag}({level}): {message}'.format(tag=tag, level=level, message=message)) | |
QgsApplication.messageLog().messageReceived.connect(write_log_message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment