You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ting, I have ported the ERA5 downloader to the Processing Toolbox. It works but it would have been nice to add the log output from CDSAPI and maybe also SuPy to the Log window in the toolbox. Do you have any idea how to get output from the python console (in QGIS) to another log? The QgsProcessing class comes with a feedback capabiliy that can be used to put out text to the log window. See e.g. line 150 in copernicusera5_algorithm.py
The text was updated successfully, but these errors were encountered:
Hi Fredrik, CDSAPI and supy both use the logging module for porting messages to log files/consoles. I think we just need to redirect the outlet from the logging-related functions to the QGIS ones.
Maybe we can use something like this (found this in another QGIS plugin). There is function called feedback.pushConsoleInfo():
loglines = []
with subprocess.Popen(fused_command,
shell=True,
stdout=subprocess.PIPE,
stdin=subprocess.DEVNULL,
stderr=subprocess.STDOUT,
universal_newlines=True) as proc:
try:
for line in iter(proc.stdout.readline, ''):
feedback.pushConsoleInfo(line)
loglines.append(line)
except:
pass
Ting, I have ported the ERA5 downloader to the Processing Toolbox. It works but it would have been nice to add the log output from CDSAPI and maybe also SuPy to the Log window in the toolbox. Do you have any idea how to get output from the python console (in QGIS) to another log? The QgsProcessing class comes with a feedback capabiliy that can be used to put out text to the log window. See e.g. line 150 in copernicusera5_algorithm.py
The text was updated successfully, but these errors were encountered: