Autophone - using logger.warning instead of synonym logger.warn

RESOLVED FIXED

Status

Testing
Autophone
--
trivial
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bc, Assigned: bc)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 750215 [details] [diff] [review]
patch v1

I had a habit of using logger.warn previously (in the tests/newlogparser.py) and carried it over into the new logdecorator code added in Bug 853961. The problem is that I didn't add the warn method to the logdecorators instead just adding the warning method. I ran into this during the 'Errors occured getting build' log message in worker.py

logger.warn is 'unofficial' and is simply an alias for logger.warning. This patch fixes the logdecorator.warn errors in worker.py and also changes the logger.warn calls to logger.warning in tests/newlogparser.py. I could have just added logdecorator.warn as an alias to logdecorator.warning, but think consistency is worth the extra llines to be changed.

I realize the lines are way to long in newlogparser.py. I'll deal with them when we get the unittests back up and running and decide what to do with the logs in general.
Attachment #750215 - Flags: review?(mcote)
(Assignee)

Updated

5 years ago
Assignee: nobody → bclary
Status: NEW → ASSIGNED

Comment 1

5 years ago
Comment on attachment 750215 [details] [diff] [review]
patch v1

Review of attachment 750215 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.  I assume it would have been simpler to just add a warn() method to LogDecorator, but whatever you'd like. :)
Attachment #750215 - Flags: review?(mcote) → review+
(Assignee)

Comment 2

5 years ago
Yeah, I thought that removing warn altogether would help eliminate future confusion and promote the use of the documented warning method for both logger and logdecorator rather than the happenstance warn alias.
(Assignee)

Comment 3

5 years ago
https://github.com/mozilla/autophone/commit/47abe33ebfdfa9d276842a9a6610d17667c07cde
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.