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.
this is what we have for mochitest + e10s to date: http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/MozillaLogger.js
Created attachment 564267 [details] 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
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
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.