-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Title: question: debugging access log format problems
Description:
The access log formatter does not appear to work without a null terminator \n . #87 was closed with an update to the docs noting the need for a newline separator. It makes sense to not enforce the newline when inserting a custom format, but a colleague and I found it difficult to determine that this may have been the problem since no leveled logging printed that there may be a problem.
I also tried validating with the config-checker tool , but it did not complain about the missing \n.
The JSON logger now automatically adds newlines with #5024 but the regular logger still can fail silently due to a bad format. Are there any potential logs or warnings that should catch these types of format problems, and if not would a PR to add some trace logs around this validation be accepted?
Repro steps:
- Use curl get against an Envoy proxied web address with the custom access logger listed below and log-level set to trace.
- Note that even with trace logging enabled, no warnings are printed and the access log is not displayed at all.
Config:
format: "[%START_TIME%] %PROTOCOL% %BYTES_RECEIVED% %BYTES_SENT% %RESPONSE_FLAGS% %UPSTREAM_HOST% %UPSTREAM_CLUSTER% %REQUESTED_SERVER_NAME%"