Page MenuHomePhabricator

Normalize structured logging data
ClosedPublic

Authored by dduvall on Oct 13 2015, 12:12 AM.

Details

Maniphest Tasks
T115137: (Re)implement logging output for scap targets
Reviewers
thcipriani
mmodell
demon
Commits
rMWTS6d1867bce787: Normalize structured logging data
rMSCA6d1867bce787: Normalize structured logging data
Patch without arc
git checkout -b D15 && curl -L https://phabricator.wikimedia.org/D15?download=true | git apply
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.

Diff Detail

Repository
rMSCA Scap
Branch
T115137
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 131
Build 132: test harbormaster with jenkins

Event Timeline

dduvall retitled this revision from to Normalize structured logging data.
dduvall updated this object.
dduvall edited the test plan for this revision. (Show Details)
dduvall added reviewers: thcipriani, demon, mmodell.
mmodell edited edge metadata.
This revision is now accepted and ready to land.Oct 13 2015, 8:50 AM
thcipriani edited edge metadata.
dduvall edited edge metadata.

Fixed issue in log serialization that omitted timestamps.

Diffed against the right commit this time