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

Document the default accessLog format #3942

Merged
merged 4 commits into from
Oct 1, 2018
Merged

Conversation

dfredell
Copy link
Contributor

What does this PR do?

Add documentation for the default accessLog format on the logs doc.

Motivation

I wanted to know what the access log format was so I could parse and label the fields correctly in my centralized logger. Ex:

111.111.133.18 - - [27/Sep/2018:18:25:09 +0000] "GET / HTTP/1.1" 200 1022 "-" "Scalyr-monitor; https://www.scalyr.com/help/monitors" 1234 "frontend" "http://192.168.10.10:8080" 2ms

I had to read the code to see what the different values were. https://github.com/containous/traefik/blob/5acd43efaf076ae2204285e750e41976c29069f2/middlewares/accesslog/logger_formatters.go#L34

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dfredell
Copy link
Contributor Author

dfredell commented Oct 1, 2018

@ldez, Are you not a fan of showing what values are quoted, like "<Traefik frontend name>"? I'm good either way, but it is just helpful when creating a parser to know that up front.

Copy link
Contributor

@nmengin nmengin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏 📖

Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dfredell and others added 4 commits October 1, 2018 15:36
Use the same case for `ElapsedMilliseconds`
There is a `ms` added to the request duration value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants