accesslog

package module
v0.0.0-...-d64a2e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

README

apachelog

Apache-style access log for Go, including Negroni middleware.

This is a modified version based on a fork of a github gist:

  1. https://gist.github.com/Tantas/1fc00c5eb7c291e2a34b
  2. https://gist.github.com/cespare/3985516

Some modifications have been made and detailed in the comments of those files.

TODO

  • Write tests

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApacheLoggingHandler

func NewApacheLoggingHandler(handler http.Handler, out io.Writer) http.Handler

Types

type ApacheLogRecord

type ApacheLogRecord struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func (*ApacheLogRecord) Log

func (r *ApacheLogRecord) Log(out io.Writer)

func (*ApacheLogRecord) Write

func (r *ApacheLogRecord) Write(p []byte) (int, error)

func (*ApacheLogRecord) WriteHeader

func (r *ApacheLogRecord) WriteHeader(status int)

type ApacheLoggingHandler

type ApacheLoggingHandler struct {
	// contains filtered or unexported fields
}

func (*ApacheLoggingHandler) ServeHTTP

func (h *ApacheLoggingHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type NegroniAccessLog

type NegroniAccessLog struct {
	// contains filtered or unexported fields
}

func NewNegroniAccessLog

func NewNegroniAccessLog(path string) *NegroniAccessLog

func (*NegroniAccessLog) ServeHTTP

func (n *NegroniAccessLog) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Define ServeHTTP method required for Negroni middleware

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL