-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Allow json output for logging (not access logs) #15020
Copy link
Copy link
Closed
Labels
area/envoy_logenhancementFeature requests. Not bugs or questions.Feature requests. Not bugs or questions.help wantedNeeds help!Needs help!
Description
This is a recreation of #13636, which was closed due to #13832. While that PR got closer, it is still not possible to get full JSON log output as far as I can tell. %_ just makes new lines escaped, but may still result in invalid JSON.
For example, with a log format of {"level":"%l","time":"%Y-%m-%dT%T.%fZ","scope":"envoy %n","msg":"%_"}:
I will get logs like:
{"level":"warning","time":"2021-02-10T14:45:45.640752Z","scope":"envoy config","msg":"StreamAggregatedResources gRPC config stream closed: 14, connection error: desc = "transport: Error while dialing dial tcp [::1]:15012: connect: connection refused""}
This is not valid JSON as the quotes in the message are not escaped.
cc @dio
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/envoy_logenhancementFeature requests. Not bugs or questions.Feature requests. Not bugs or questions.help wantedNeeds help!Needs help!