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. 1054
capture.py Wrapper for file like objects to redirect output to logger instead 3149
commandline.py a subset of formatters for non test harnesses related applications 12348
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') 8661
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. 2426
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. 2838
scripts
stdadapter.py Adapter for stdlib logging so that it produces structured messages rather than standard logging messages :param logger: logging.Logger to wrap 1479
structuredlog.py Structured Logging for recording test results. Allowed actions, and subfields: suite_start tests - List of test names name - Name for the suite run_info - Dictionary of run properties add_subsuite name - Name for the subsuite (must be unique) run_info - Updates to the suite run_info (optional) group_start name - Name for the test group group_end name - Name for the test group suite_end test_start test - ID for the test path - Relative path to test (optional) subsuite - Name of the subsuite to which test belongs (optional) group - Name of the test group for the incoming 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'] subsuite - Name of the subsuite to which test belongs (optional) group - Name of the test group for the incoming test (optional) 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'] subsuite - Name of the subsuite to which test belongs (optional) group - Name of the test group for the incoming test (optional) process_output process - PID of the process command - Command line of the process data - Output data from the process test - ID of the test that the process was running (optional) subsuite - Name of the subsuite that the process was running (optional) assertion_count count - Number of assertions produced min_expected - Minimum expected number of assertions max_expected - Maximum expected number of assertions subsuite - Name of the subsuite for the tests that ran (optional) 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 subsuite - Name of the subsuite for the tests that ran (optional) lsan_summary bytes - Number of bytes leaked allocations - Number of allocations allowed - Boolean indicating whether all detected leaks matched allow rules subsuite - Name of the subsuite for the tests that ran (optional) 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 subsuite - Name of the subsuite for the tests that ran (optional) 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 29625
unstructured