Normalize structured logging data
Summary:
Refactored serialization of structured JSON logging to use Python's
native support for "extra" logging.LogRecord attributes over a
specialized log.Message class, and to include as much LogRecord data
as the class will allow us to reconstruct on the consuming end.
This should provide a more consistent interface for log records
regardless of where they originate, making implementation of T115137
more straightforward.
Test Plan: Run tox or unittests in tests/log_test.py and tests/ssh_test.py.
Reviewers: demon, thcipriani, mmodell
Reviewed By: thcipriani, mmodell
Maniphest Tasks: T115137
Differential Revision: https://phabricator.wikimedia.org/D15