I have an instance of https://qgis.org/pyqgis/master/core/Qgis.html#qgis.core.Qgis.MessageLevel, e.g.
level = Qgis.Info
I want to get a human-readable string like "Info" or "Qgis.Info" from this object.
print(level)
prints0
str(level)
returns0
type(level)
returns<class 'qgis._core.Qgis.MessageLevel'>
Is there a straightforward way to get a human-readable string representation of the MessageLevel
object's level?
I am not looking for an if
clause checking the integer value against the known values but if that is all that would be possible, a explanatory and canonical "no" would be a good answer.