Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: debugging access log format problems #5193

Closed
cmluciano opened this issue Dec 3, 2018 · 10 comments
Closed

question: debugging access log format problems #5193

cmluciano opened this issue Dec 3, 2018 · 10 comments
Assignees
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently

Comments

@cmluciano
Copy link
Member

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%"
@mattklein123 mattklein123 added the question Questions that are neither investigations, bugs, nor enhancements label Dec 3, 2018
@stale
Copy link

stale bot commented Jan 2, 2019

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Jan 2, 2019
@cmluciano
Copy link
Member Author

@htuch @ggreenway looks like you both have merged things recently into the access log code.

Do either of you have any opinions on this?

@mattklein123
Copy link
Member

@cmluciano can you propose a potential change here? From a quick read I'm not sure I fully grok the issue.

@ggreenway
Copy link
Contributor

Is there any reasonable use-case for not having a newline in the format? I'd be fine with automatically adding a newline at the end if one isn't present.

@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Jan 7, 2019
@cmluciano
Copy link
Member Author

@mattklein123 @ggreenway Yes the change I had in mind was validation that a newline is present and either logging or automatically adding one. Without the newline we don't see any error messages and access logging is non functional.

The change would be similar to #5024

@ggreenway
Copy link
Contributor

That seems fine to me. If anyone comes up with a valid use-case for no-newline, you can put it behind a new config bit.

@htuch
Copy link
Member

htuch commented Jan 9, 2019

Automatically adding a new line if not present seems fine to me as well.

@cmluciano
Copy link
Member Author

/assign @cmluciano

@stale
Copy link

stale bot commented Feb 17, 2019

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Feb 17, 2019
@stale
Copy link

stale bot commented Feb 24, 2019

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

4 participants