Skip to content

NGINX Plus: Fix inconsistent quoting in access log format example #465

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

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

travisamartin
Copy link
Contributor

Description

This PR fixes a minor inconsistency in the access log format example under the "Setting Up the Access Log" section.

Closes #464

Previously, $request_time was not quoted while the other upstream time variables ($upstream_connect_time, $upstream_header_time, $upstream_response_time) were.
For consistency and to prevent possible confusion when parsing logs, $request_time is now also surrounded by double quotes.

Changes

  • Updated the log_format example to quote $request_time consistently.
http {
    log_format upstream_time '$remote_addr - $remote_user [$time_local] '
                             '"$request" $status $body_bytes_sent '
                             '"$http_referer" "$http_user_agent"'
                             'rt="$request_time" uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';

    server {
        access_log /spool/logs/nginx-access.log upstream_time;
        ...
    }
}

Related Feedback

  • Based on user survey feedback (Response ID: R_32x2MusOk4P1dto).

Impact

  • Improves clarity and consistency in the documentation examples.
  • No functional changes to NGINX behavior.

@travisamartin travisamartin added bug Something isn't working product/nginx-plus NGINX Plus (and NGINX Open Source in docs.ngninx.com) customer-feedback labels Apr 28, 2025
@travisamartin travisamartin self-assigned this Apr 28, 2025
@travisamartin travisamartin requested a review from a team as a code owner April 28, 2025 21:08
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 28, 2025
Copy link

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/docs/465/

@travisamartin travisamartin enabled auto-merge (squash) April 28, 2025 21:19
@travisamartin travisamartin disabled auto-merge April 29, 2025 12:46
@travisamartin travisamartin merged commit cf04a01 into main Apr 29, 2025
9 checks passed
@travisamartin travisamartin deleted the 464-fix-log-format-quoting branch April 29, 2025 12:46
weli02 pushed a commit to weli02/documentation that referenced this pull request Apr 30, 2025
…inx#465)

fix: make quoting consistent in access log format example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer-feedback documentation Improvements or additions to documentation product/nginx-plus NGINX Plus (and NGINX Open Source in docs.ngninx.com)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

N+ Configure Logging: Inconsistent quoting in log format example in Access Log setup documentation
2 participants