When you create a StreamHandler without arguments, it will output to stderr. That being a Standard Error stream, causes Azure to show its output as errors.
StreamHandler
stderr
https://docs.python.org/3/library/logging.handlers.html#logging.StreamHandler