log

package
v0.0.0-...-f52ea5f Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIME_HIPACHE_MODE = "02/Jan/2006:15:04:05 -0700"
)

Variables

View Source
var (
	ErrorLogger = NewWriterLogger(syncCloser{os.Stderr})
)

Functions

This section is empty.

Types

type ErrEntry

type ErrEntry struct {
	Path    string
	Rid     string
	Err     string
	Backend string
	Host    string
	RawMsgs []interface{}
}

type LogEntry

type LogEntry struct {
	Now             time.Time
	BackendDuration time.Duration
	TotalDuration   time.Duration
	BackendKey      string
	RemoteAddr      string
	Method          string
	Path            string
	Proto           string
	Referer         string
	UserAgent       string
	RequestIDHeader string
	RequestID       string
	ForwardedFor    string
	StatusCode      int
	ContentLength   int64
	Err             *ErrEntry
}

type Logger

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

func NewFileLogger

func NewFileLogger(path string) (*Logger, error)

func NewStdoutLogger

func NewStdoutLogger() (*Logger, error)

func NewSyslogLogger

func NewSyslogLogger() (*Logger, error)

func NewWriterLogger

func NewWriterLogger(writer io.WriteCloser) *Logger

func (*Logger) MessageRaw

func (l *Logger) MessageRaw(entry *LogEntry)

func (*Logger) Print

func (l *Logger) Print(msgs ...interface{})

func (*Logger) Stop

func (l *Logger) Stop()

Jump to

Keyboard shortcuts

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