Closed
Bug 675376
Opened 14 years ago
Closed 14 years ago
Add better support for logging in test support
Categories
(Cloud Services :: Server: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: telliott, Assigned: tarek)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
|
1.14 KB,
patch
|
rmiller
:
review+
telliott
:
review+
|
Details | Diff | Splinter Review |
It would be nice to have a way to easily make logging seamless in tests, particularly those that use WebTest (so are talking to an "independent" server. Right now, they aren't in the app config (and tarek is correct that it's not really an app function). Even something as simple as initlog(product, file) at the start of the tests might be sufficient, though there's a lot we could do past that.
| Reporter | ||
Updated•14 years ago
|
Assignee: nobody → tarek
| Assignee | ||
Comment 1•14 years ago
|
||
Here's the log catcher
the usage is very simple:
with catch_logs() as logs:
..your test..
logs = logs.read()
by default it catches the syncserver logger at the error level, but you can catch any level, and any logger -- see the tests
This supersede the need to set up the logger via a config file or programmatically
Attachment #550992 -
Flags: review?(telliott)
Attachment #550992 -
Flags: review?(rmiller)
| Reporter | ||
Comment 2•14 years ago
|
||
Comment on attachment 550992 [details] [diff] [review]
context manager to catch logs
Looks good to me, though I'll defer to rmiller as to how it fits into the stuff he's working on.
| Reporter | ||
Updated•14 years ago
|
Attachment #550992 -
Flags: review?(telliott) → review+
Updated•14 years ago
|
Attachment #550992 -
Flags: review?(rmiller) → review+
| Assignee | ||
Comment 3•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•