Closed Bug 1034287 Opened 10 years ago Closed 8 years ago

Integrate Structured Logging with Gaia Build Tests

Categories

(Testing :: Mozbase, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: chmanchester, Unassigned)

References

(Blocks 1 open bug)

Details

Just so I have the link somewhere, it looks like: https://github.com/mozilla-b2g/mocha-socket-reporter provides messages in the mozlog format now.
I'm looking at this now and it looks like what's needed is a frankensteinesque combination of the mocha-socket-reporter to get JSON in the desired format and the mocha-tbpl-reporter to dump it to the console. This is going to be a DRY violation (but not a huge one). Andrew, do you know of a way to separate the message formatting from the transport in a mocha reporter, or should I bite the bullet here?
Flags: needinfo?(ahalberstadt)
Why can't whatever is receiving the structured logs over the socket do the formatting/dumping?
Flags: needinfo?(ahalberstadt)
Looks like the gaia build and integration tests can end up sharing a solution here. I'm thinking just a clone of mocha-socket-reporter that replaces result.send calls with console.log ... but maybe we can do better?
Yeah, that's probably the easiest way to move quickly.
I have an initial version of this (passing its own tests) at https://github.com/chmanchester/mocha-structured-reporter Making use of it is going to depend on an established way to consume structured logs in mozharness.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.