Closed Bug 872857 Opened 11 years ago Closed 11 years ago

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

Categories

(Testing Graveyard :: Autophone, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bc, Assigned: bc)

References

()

Details

Attachments

(1 file)

Attached patch patch v1Splinter Review
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: nobody → bclary
Status: NEW → ASSIGNED
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+
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.
https://github.com/mozilla/autophone/commit/47abe33ebfdfa9d276842a9a6610d17667c07cde
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: