Add Logger.error_occured

This flag is set to True if .error() is called, and automatically propagated to
the parent logger from a sub logger.