Closed
Bug 688835
Opened 14 years ago
Closed 13 years ago
write a MozLog package to unify logging
Categories
(Testing :: General, defect)
Testing
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: k0scist, Assigned: ahal)
Details
(Whiteboard: [mozbase])
Attachments
(1 file)
3.67 KB,
text/plain
|
Details |
https://wiki.mozilla.org/Auto-tools/Projects/MozBase#Logging_MozLog_Package
Right now, each harness implements its own logging to conform to a kinda non-specified log format: https://developer.mozilla.org/en/Test_log_format
Instead there should be one python package and perhaps one JS module to log appropriately. This way new harnesses could make use of this and refinement of the logger would help all harnesses.
see also bug 622395
Assignee | ||
Comment 1•14 years ago
|
||
For my responsiveness testing harness I'll need to write my logs JS side since that is the only way to communicate back the results to python without doing something crazy like using jsbridge.
So I'd be happy to work on a JS side module.
Comment 2•14 years ago
|
||
this is what we have for mochitest + e10s to date:
http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/MozillaLogger.js
Assignee | ||
Comment 3•13 years ago
|
||
This module wraps python's logging module and adds some basic functionality to allow you to log test specific messages (pass/fail etc.) as well as makes it easier to initialize a logger.
Let me know if you have any feedback or things you'd like to see added to this module.
This code can be used like this:
import mozlog
logger = mozlog.getLogger('MYAPP') # logs to stdout if no file passed in
logger.setLevel(mozlog.DEBUG)
logger.info('foo')
logger.testPass('bar')
mozlog.shutdown()
Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 564267 [details]
Ver 1.0 - mozlog
Changing the damn mimetype so I can actually view it :(
Attachment #564267 -
Attachment mime type: text/x-python → text/plain
Reporter | ||
Comment 5•13 years ago
|
||
Comment on attachment 564267 [details]
Ver 1.0 - mozlog
I would probably structure this differently, but its fine for a first pass
Assignee | ||
Comment 6•13 years ago
|
||
This got committed to https://github.com/mozilla/mozbase/tree/master/mozlog
Further issues / enhancements should be filed in new bugs under Testing/Mozbase
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Attachment #564267 -
Flags: feedback?
You need to log in
before you can comment on or make changes to this bug.
Description
•