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

Access Log: static files get logged always (or twice) #219

Closed
AugustHell opened this issue Oct 30, 2018 · 4 comments
Closed

Access Log: static files get logged always (or twice) #219

AugustHell opened this issue Oct 30, 2018 · 4 comments
Assignees
Labels
Projects

Comments

@AugustHell
Copy link

AugustHell commented Oct 30, 2018

What version of aah are you using (aah --version)?

v0.11.4

Does this issue reproduce with the latest release?

not tested

What operating system are you using (such as macOS, Linux and Windows)?

Linux

What did you do?

added configuration:

server {
    access_log {
      enable = true
      file = "logs/access.log"
      pattern = "%clientip %custom:- %reqtime %reqmethod %requrl %reqproto %resstatus %ressize %restime %reqhdr:referer"
      static_file = false
    }
}

What did you expect to see?

No static files in the access logs

What did you see instead?

Log entries for static .css, .jpg .js .gif files.

Using static_file = true logs every of these files twice, like:

xxx.xxx.xxx.xxx - 2018-10-30T17:01:44Z GET /favicon.ico HTTP/2.0 304 0 0.2215 - 
xxx.xxx.xxx.xxx - 2018-10-30T17:01:44Z GET /favicon.ico HTTP/2.0 304 0 0.2310 - 
while a generated, non static html request in both cases (static_file = true or false) gets logged once:
xxx.xxx.xxx.xxx - 2018-10-30T17:01:44Z GET / HTTP/2.0 200 4515 1.9657 -

Don't think it is a big issue, but want to report it.

@jeevatkm
Copy link
Member

@AugustHell Thanks for reporting it. I will look into it.

@jeevatkm jeevatkm self-assigned this Nov 1, 2018
@jeevatkm jeevatkm added bug and removed analysis labels Nov 1, 2018
@jeevatkm
Copy link
Member

jeevatkm commented Nov 1, 2018

@AugustHell I have found the root for the issue. Access log called twice in the request life cycle and one of the call location does not have check for server.access_log.static_file.

I will apply fix in upcoming release v0.12.0. Thanks.

@jeevatkm jeevatkm added this to the v0.12.0 Milestone milestone Nov 2, 2018
@jeevatkm jeevatkm added this to v0.12.0 - Iteration in aah Roadmap via automation Nov 2, 2018
@jeevatkm jeevatkm moved this from v0.12.0 - Iteration to v0.12.0 - In Progress in aah Roadmap Nov 2, 2018
@jeevatkm
Copy link
Member

jeevatkm commented Nov 2, 2018

Done 😄

@jeevatkm jeevatkm closed this as completed Nov 2, 2018
aah Roadmap automation moved this from v0.12.0 - In Progress to v0.12.0 - Completed Nov 2, 2018
@AugustHell
Copy link
Author

Great. Thank you :+1

@jeevatkm jeevatkm moved this from v0.12.0 - Completed to Released to Audience in aah Roadmap Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
aah Roadmap
  
Released to Audience
Development

No branches or pull requests

2 participants