How to write log message in QGIS's script algorithms GUI tab?
You can do this with global variable progress
. see the user manual, processing chapter
progress.setText('Youpi')
Will print 'Youpi' in the processing log.
It supports html formatting:
progress.setText('<b>Youpi</b>')
to print in bold...
progress come also with setPercentage()
methods to control the progress bar
For QGIS 3.x you can use the pushInfo()
method on a feedback
object:
feedback.pushInfo('This is a log message')
See the scripts section of the user's manual for other relevant methods.