Closed Bug 688835 Opened 14 years ago Closed 13 years ago

write a MozLog package to unify logging

Categories

(Testing :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: k0scist, Assigned: ahal)

Details

(Whiteboard: [mozbase])

Attachments

(1 file)

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
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.
Attached file Ver 1.0 - mozlog
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()
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Attachment #564267 - Flags: feedback?
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
Comment on attachment 564267 [details] Ver 1.0 - mozlog I would probably structure this differently, but its fine for a first pass
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
Attachment #564267 - Flags: feedback?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: