logging

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG = iota
	INFO
	WARN
	ERR
)

Variables

This section is empty.

Functions

func DefaultLogger

func DefaultLogger() *log.Logger

func HTTPAccessLogger

func HTTPAccessLogger(filename string, maxSize int, maxBackups int, maxAge int, compress bool) *log.Logger

func Logger

func Logger(logLevel string, prefix string, flag int, filename string, maxSize int, maxBackups int, maxAge int, compress bool) *log.Logger

func NewCallerWriter

func NewCallerWriter(out io.Writer, prefix string, flag int) io.Writer

func NewFileWriter

func NewFileWriter(filename string, maxSize int, maxBackups int, maxAge int, compress bool) io.Writer

func NewLogLevelFilter

func NewLogLevelFilter(logLevel string, writer io.Writer) io.Writer

Types

type ApacheCombinedLogger

type ApacheCombinedLogger struct {
	Logger *log.Logger
}

func (ApacheCombinedLogger) Log

func (l ApacheCombinedLogger) Log(record accesslog.LogRecord)

type CallerWriter

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

func (*CallerWriter) Write

func (l *CallerWriter) Write(p []byte) (n int, err error)

type LogLevel

type LogLevel int

func (LogLevel) String

func (l LogLevel) String() string

Jump to

Keyboard shortcuts

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