oxidecomputer / maghemite

A routing stack written in Rust.
Mozilla Public License 2.0
36 stars 2 forks source link

mg-ddm appears to emit both plaintext and bunyan-format logs #350

Open davepacheco opened 2 months ago

davepacheco commented 2 months ago

Elsewhere we use bunyan-format logs, which are JSON entries that looker can read. In some places (some dev tools) we have configured slog to emit a plaintext format. mg-ddm appears to do both of these. Here's a snippet from a file:

{"msg":"[vioif2] removing 0 routes from illumos","v":0,"name":"slog-rs","level":30,"time":"2024-08-27T17:18:48.458201847Z","hostname":"g3","pid":1339}
Aug 27 17:23:04.670 DEBG client request, body: Some(Body), uri: http://[fd00:1122:3344:102::5]:12221/metrics/producers, method: POST, component: producer-registration-task

The plaintext output makes it much harder to do things like filtering on log level with looker.

rcgoodfellow commented 2 months ago

Yeah I think the omicron/oximiter logging is colliding with normal maghemite logging. Will look into this. Maghemite does use bunyan-format logs and I use looker with it a lot. But it seems something has gone sideways with recent integrations that do their own logging.