access_log

package
Version: v0.0.0-...-eb0d769 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2014 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmitter

func NewEmitter(loggregatorUrl, loggregatorSharedSecret string, index uint) (emitter.Emitter, error)

Types

type AccessLogRecord

type AccessLogRecord struct {
	Request       *http.Request
	StatusCode    int
	RouteEndpoint *route.Endpoint
	StartedAt     time.Time
	FirstByteAt   time.Time
	FinishedAt    time.Time
	BodyBytesSent int64
}

func (*AccessLogRecord) ApplicationId

func (r *AccessLogRecord) ApplicationId() string

func (*AccessLogRecord) FormatRequestHeader

func (r *AccessLogRecord) FormatRequestHeader(k string) (v string)

func (*AccessLogRecord) FormatStartedAt

func (r *AccessLogRecord) FormatStartedAt() string

func (*AccessLogRecord) LogMessage

func (r *AccessLogRecord) LogMessage() string

func (*AccessLogRecord) ResponseTime

func (r *AccessLogRecord) ResponseTime() float64

func (*AccessLogRecord) WriteTo

func (r *AccessLogRecord) WriteTo(w io.Writer) (int64, error)

type AccessLogger

type AccessLogger interface {
	Run()
	Stop()
	Log(record AccessLogRecord)
}

func CreateRunningAccessLogger

func CreateRunningAccessLogger(config *config.Config) (AccessLogger, error)

type FileAndLoggregatorAccessLogger

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

func NewFileAndLoggregatorAccessLogger

func NewFileAndLoggregatorAccessLogger(f io.Writer, e emitter.Emitter) *FileAndLoggregatorAccessLogger

func (*FileAndLoggregatorAccessLogger) Log

func (*FileAndLoggregatorAccessLogger) Run

func (*FileAndLoggregatorAccessLogger) Stop

type NullAccessLogger

type NullAccessLogger struct {
}

func (*NullAccessLogger) Log

func (*NullAccessLogger) Run

func (x *NullAccessLogger) Run()

func (*NullAccessLogger) Stop

func (x *NullAccessLogger) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL