Skip to content

question: debugging access log format problems #5193

@cmluciano

Description

@cmluciano

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:

  1. Use curl get against an Envoy proxied web address with the custom access logger listed below and log-level set to trace.
  2. 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%"

Metadata

Metadata

Assignees

Labels

questionQuestions that are neither investigations, bugs, nor enhancementsstalestalebot believes this issue/PR has not been touched recently

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions