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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 131
Build 132: test harbormaster with jenkins

Event Timeline

dduvall updated this revision to Diff 53.Oct 13 2015, 12:12 AM
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.Oct 13 2015, 3:59 AM

This is awesome.

mmodell accepted this revision.Oct 13 2015, 8:50 AM
mmodell edited edge metadata.
This revision is now accepted and ready to land.Oct 13 2015, 8:50 AM
thcipriani accepted this revision.Oct 14 2015, 9:50 PM
thcipriani edited edge metadata.
dduvall updated this revision to Diff 61.Oct 15 2015, 1:56 AM
dduvall edited edge metadata.

Fixed issue in log serialization that omitted timestamps.

dduvall updated this revision to Diff 63.Oct 15 2015, 3:39 PM

Diffed against the right commit this time

dduvall closed this revision.Oct 15 2015, 8:29 PM