Error handling
To use various streams in automation like ERROR, WARNING, DEBUG or VERBOSE with Python in Azure Automation you should add those words to print command like here:
print("Standard output")
print("ERROR: Error output")
print("WARNING: Warning output")
print("DEBUG: Debug