Closed
Bug 872857
Opened 12 years ago
Closed 12 years ago
Autophone - using logger.warning instead of synonym logger.warn
Categories
(Testing Graveyard :: Autophone, defect)
Testing Graveyard
Autophone
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bc, Assigned: bc)
References
()
Details
Attachments
(1 file)
31.57 KB,
patch
|
mcote
:
review+
|
Details | Diff | Splinter 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 | ||
Updated•12 years ago
|
Assignee: nobody → bclary
Status: NEW → ASSIGNED
Comment 1•12 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•12 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•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•