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

Server Access Log #69

Closed
3 tasks done
jeevatkm opened this issue Jun 13, 2017 · 5 comments
Closed
3 tasks done

Server Access Log #69

jeevatkm opened this issue Jun 13, 2017 · 5 comments
Assignees
Labels
aah Framework scope feature
Projects

Comments

@jeevatkm
Copy link
Member

jeevatkm commented Jun 13, 2017

To manage server effectively it is necessary to know details about the request, response, processing time, client IP address, etc. aah framework provides the flexible and configurable access log capabilities.

aah server logs the details based on log flags. Flag format usage is %flagname

The available flags as follows:

  • clientip - Client IP address aka Remote IP address
  • reqtime - Time of request is recevied by server. Local time in default format RFC3339 or you can provide one
  • requrl - Request URL not including query string
  • reqmethod - Request HTTP method
  • reqproto - Request Protocol. For e.g: HTTP/1.1, HTTP/2.0
  • reqid - It logs request id otherwise it logs -. Refer request.id.header config in the aah.conf
  • reqhdr:<header_name> - To log request header, if not available - is logged
  • querystr - To log request query string if available otherwise - is logged
  • resstatus - Response Status
  • ressize - Bytes sent, excluding response HTTP headers, otherwise - if no bytes were sent
  • reshdr:<header_name> - To log response header, if not available - is logged
  • restime - Request processing time (in milliseconds), time elapsed between the request recevied by server and the last bytes were written on the wire by server
  • custom - Add non-space string into log string

Access log processing should not affect the app perfomance.

Access Log Configuration:

request {
   access_log {
      # Default is false
      enable = false

      # Absolute path of log file
      # Default location is application logs directory
      file = "<appname>-access.log"

      # This is default access log pattern
      pattern = "%clientip %custom:- %reqtime %reqmethod %requrl %reqproto %resstatus %ressize %restime %reqhdr:referer"
   }
}
@jeevatkm
Copy link
Member Author

@adelowo Please join gitter share your User Id then I will invite you into the dev channel. This is private channel for dev-team.

@adelowo
Copy link
Contributor

adelowo commented Jun 13, 2017

Id -> 58266a50d73408ce4f3546ba
username -> adelowo

@jeevatkm
Copy link
Member Author

Just added you into the dev channel.

jeevatkm added a commit to go-aah/essentials that referenced this issue Jun 14, 2017
@adelowo
Copy link
Contributor

adelowo commented Jun 15, 2017

Since we have made headway, this (https://github.com/go-aah/tools/blob/v0-unstable/aah/app-template/config/aah.conf.atmpl#L109-L123) would also have to be updated... At least it should contain request.access_log.enable.

@jeevatkm
Copy link
Member Author

jeevatkm commented Jun 15, 2017

You're correct, after merging your PR, Then app-template will be updated with request access log configuration with default values. I will take care that.

jeevatkm pushed a commit that referenced this issue Jun 17, 2017
Signed-off-by: Lanre Adelowo <me@lanreadelowo.com>
jeevatkm added a commit to go-aah/tools that referenced this issue Jun 17, 2017
@jeevatkm jeevatkm modified the milestone: v0.7 Milestone Jun 18, 2017
jeevatkm added a commit that referenced this issue Jun 19, 2017
@jeevatkm jeevatkm moved this from Backlog to In Progress in aah Roadmap Jun 19, 2017
@jeevatkm jeevatkm self-assigned this Jul 1, 2017
jeevatkm added a commit that referenced this issue Jul 3, 2017
jeevatkm added a commit that referenced this issue Jul 3, 2017
@jeevatkm jeevatkm changed the title Request Access Log Server Access Log Jul 7, 2017
@jeevatkm jeevatkm closed this as completed Jul 8, 2017
@jeevatkm jeevatkm moved this from In Progress to Done in aah Roadmap Jul 9, 2017
jeevatkm added a commit to go-aah/docs that referenced this issue Jul 10, 2017
jeevatkm added a commit that referenced this issue Jul 11, 2017
jeevatkm added a commit to go-aah/app-templates that referenced this issue Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aah Framework scope feature
Projects
aah Roadmap
  
Released to Audience
Development

No branches or pull requests

2 participants