Closed
Bug 671853
Opened 13 years ago
Closed 13 years ago
use Python logging module in AUS3
Categories
(Release Engineering :: General, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bhearsum, Assigned: bhearsum)
References
Details
Attachments
(2 files)
(deleted),
patch
|
nthomas
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
nthomas
:
review+
nthomas
:
checked-in+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•13 years ago
|
Priority: -- → P3
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → bhearsum
Assignee | ||
Comment 1•13 years ago
|
||
Much of this patch is s/print/log.[something]/. I converted all of the commented out print statements from AUS.py to log.debug, which will be shown if AUS-server.py or test-rules.py are run in verbose mode. I converted dumpRules and dumpReleases to plain getters because I thought it felt like the actually printing of those belonged in test-rules.py. I can revert that if you prefer, though.
Attachment #547195 -
Flags: review?(nrthomas)
Comment 2•13 years ago
|
||
Comment on attachment 547195 [details] [diff] [review]
use python logging in AUS3 + test runner
Is nice! A few nits to fix on landing:
>- #print row, updateQuery['name']
>+ log.debug("AUS.getMatchingRules: %s %s", row, updateQuery['name'])
Need to do self.convertRule(row) so we get something useful printed; can drop the updateQuery part. This looks like ancient code of mine.
> def evaluateRules(self, updateQuery):
...
>+ log.debug("AUS.evaluateRules: Matching rules:")
>+ for r in rules:
>+ log.debug("AUS.evaluateRules: %s", r)
Not worth writing out the rules here and in getMatchingRules, so I'd suggest pulling this one.
> if not res:
> # need to log some sort of data inconsistency error here
>- # print "AUS.expandRelease failed to get release data from db"
>+ log.debug("AUS.expandRelease: Failed to get release data from db for:")
>+ log.debug("AUS.expandRelease: %s", updateQuery)
I think I meant to write rule['mapping'] instead of updateQuery there.
>diff --git a/test-rules.py b/test-rules.py
>- print "FAIL: %s" % f
>+ log.info("FAIL: ", f)
Need to add back in the %s's in this file.
Attachment #547195 -
Flags: review?(nrthomas) → review+
Comment 3•13 years ago
|
||
Since I want to re-organise the code I went ahead and made those changes, and fixed the rot from the alias bug.
http://hg.mozilla.org/users/nthomas_mozilla.com/aus3-proto/rev/3602a2f4a621
FIXED ?
Attachment #547318 -
Flags: review+
Attachment #547318 -
Flags: checked-in+
Comment 4•13 years ago
|
||
Missed one of my comments, fixed in
http://hg.mozilla.org/users/nthomas_mozilla.com/aus3-proto/rev/046f84413300
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to comment #3)
> Created attachment 547318 [details] [diff] [review] [review]
> use python logging in AUS3 + test runner, v1.1
>
> Since I want to re-organise the code I went ahead and made those changes,
> and fixed the rot from the alias bug.
>
> http://hg.mozilla.org/users/nthomas_mozilla.com/aus3-proto/rev/3602a2f4a621
>
> FIXED ?
(In reply to comment #4)
> Missed one of my comments, fixed in
> http://hg.mozilla.org/users/nthomas_mozilla.com/aus3-proto/rev/046f84413300
Looks good to me.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
You need to log in
before you can comment on or make changes to this bug.
Description
•