urbanairship / python-library

A Python library for using the Airship APIs for push notifications, reporting and other message types
https://docs.airship.com/api/libraries/python/
Other
82 stars 65 forks source link

Erroneous log messages #44

Closed AlecRosenbaum closed 2 years ago

AlecRosenbaum commented 5 years ago

We only accept issues for bug reporting purposes.

All feature requests, implementation concerns or general queries should be sent to our support team.

Before completing the form below, please check the following:

Expected Behavior

Log non-200 urbanairship responses at an INFO or DEBUG level

Current Behavior

Currently they're logged as at an ERROR level, while all other messages are logged at an INFO level.

Possible Solution

Change this line from logger.error(... to logger.info(... https://github.com/urbanairship/python-library/blob/cf4cc04025da72f6a0e9d6676a542bfdc14fa07f/urbanairship/common.py#L82-L85

Steps to Reproduce

Get a non 200 response

Detailed Description

This is the only place that logs messages at the ERROR level. This seems a bit excessive since the logging happens during the creation of a loud AirshipFailure, which will propagate up the stack with a full stack trace

Possible Fix

aschuman0 commented 5 years ago

Hi Alec! Thank you for opening this issue. We will review this shortly and get back to you with any questions and/or note the release where this is addressed.

aschuman0 commented 2 years ago

This has been changed to log as a warning as of 6.0.1.