Name Description Size
__init__.py Mozlog aims to standardize log handling and formatting within Mozilla. It implements a JSON-based structured logging protocol with convenience facilities for recording test results. The old unstructured module is deprecated. It simply wraps Python's logging_ module and adds a few convenience methods for logging test results and events. 1120
capture.py Wrapper for file like objects to redirect output to logger instead 3189
commandline.py a subset of formatters for non test harnesses related applications 12388
formatters
handlers
logtypes.py A DataType that contains other DataTypes. ContainerTypes must specify which other DataType they will contain. ContainerTypes may contain other ContainerTypes. Some examples: List(Int, 'numbers') Tuple((Unicode, Int, Any), 'things') Dict(Unicode, 'config') Dict({TestId: Status}, 'results') Dict(List(Unicode), 'stuff') 8721
proxy.py A ProxyLogger behaves like a :class:`mozlog.structuredlog.StructuredLogger`. Each method and attribute access will be forwarded to the underlying StructuredLogger. RuntimeError will be raised when the default logger is not yet initialized. 2466
pytest_mozlog
reader.py Return a generator that will return the entries in a structured log file. Note that the caller must not close the file whilst the generator is still in use. :param log_f: file-like object containing the raw log entries, one per line :param raise_on_error: boolean indicating whether ValueError should be raised for lines that cannot be decoded. 2878
scripts
stdadapter.py Adapter for stdlib logging so that it produces structured messages rather than standard logging messages :param logger: logging.Logger to wrap 1519
structuredlog.py Structured Logging for recording test results. Allowed actions, and subfields: suite_start tests - List of test names name - Name for the suite suite_end test_start test - ID for the test path - Relative path to test (optional) test_end test - ID for the test status [PASS | FAIL | OK | ERROR | TIMEOUT | CRASH | ASSERT PRECONDITION_FAILED | SKIP] - test status expected [As for status] - Status that the test was expected to get, or absent if the test got the expected status extra - Dictionary of harness-specific extra information e.g. debug info known_intermittent - List of known intermittent statuses that should not fail a test. eg. ['FAIL', 'TIMEOUT'] test_status test - ID for the test subtest - Name of the subtest status [PASS | FAIL | TIMEOUT | PRECONDITION_FAILED | NOTRUN | SKIP] - test status expected [As for status] - Status that the subtest was expected to get, or absent if the subtest got the expected status known_intermittent - List of known intermittent statuses that should not fail a test. eg. ['FAIL', 'TIMEOUT'] process_output process - PID of the process command - Command line of the process data - Output data from the process assertion_count count - Number of assertions produced min_expected - Minimum expected number of assertions max_expected - Maximum expected number of assertions lsan_leak frames - List of stack frames from the leak report scope - An identifier for the set of tests run during the browser session (e.g. a directory name) allowed_match - A stack frame in the list that matched a rule meaning the leak is expected lsan_summary bytes - Number of bytes leaked allocations - Number of allocations allowed - Boolean indicating whether all detected leaks matched allow rules mozleak_object process - Process that leaked bytes - Number of bytes that leaked name - Name of the object that leaked scope - An identifier for the set of tests run during the browser session (e.g. a directory name) allowed - Boolean indicating whether the leak was permitted log level [CRITICAL | ERROR | WARNING | INFO | DEBUG] - level of the logging message message - Message to log Subfields for all messages: action - the action type of the current message time - the timestamp in ms since the epoch of the log message thread - name for the thread emitting the message pid - id of the python process in which the logger is running source - name for the source emitting the message component - name of the subcomponent emitting the message 24436
unstructured