HomePhabricator Dev

[mozlog] Allow passing messages down to formatters (Bug 1534341) r=jgraham

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

[mozlog] Allow passing messages down to formatters (Bug 1534341) r=jgraham

This addition allows formatters to be configured by sending a message.

For example, the show_logs attribute has been added to the GroupingFormatter
to allow switching on/off the display of all log messages at runtime.
A generic handle_message method was added to the BaseFormatter to allow
attributes to be configured, with optional arguments for those that require
it.

An additional log(data) method has been implemented on the GroupingFormatter
that checks self.show_logs, and if True, displays all messages regardless of
failure or success, with component, level and stack.

A test may be required to ensure this is behaving as expected.

Differential Revision: https://phabricator.services.mozilla.com/D23726

Details

Provenance
nikkisAuthored on

Commit No Longer Exists

This commit no longer exists in the repository.