Skip to content
Permalink
Browse files

[processing] better output logging for gdal/org calls

Fixes #11501
  • Loading branch information
volaya committed Nov 21, 2014
1 parent f3fdd9c commit 51de0caeb8efb31d55885cbd23e9f1d3ef8b0aa7
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/plugins/processing/algs/gdal/GdalUtils.py
@@ -69,15 +69,17 @@ def runGdal(commands, progress):
loglines = []
loglines.append('GDAL execution console output')
fused_command = ''.join(['%s ' % c for c in commands])
print fused_command
proc = subprocess.Popen(
fused_command,
shell=True,
stdout=subprocess.PIPE,
stdin=open(os.devnull),
stderr=subprocess.STDOUT,
universal_newlines=False,
universal_newlines=True,
).stdout
for line in iter(proc.readline, ''):
print line
loglines.append(line)
ProcessingLog.addToLog(ProcessingLog.LOG_INFO, loglines)
GdalUtils.consoleOutput = loglines

0 comments on commit 51de0ca

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