logging

package
v0.0.0-...-6dbf283 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG
	WARN
	INFO
	ERROR
)

Variables

This section is empty.

Functions

func Middleware

func Middleware(log Logger) mux.Middleware

Types

type FileLogger

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

func (*FileLogger) Close

func (p *FileLogger) Close()

func (*FileLogger) Debug

func (p *FileLogger) Debug(format string, args ...interface{})

func (*FileLogger) Error

func (p *FileLogger) Error(format string, args ...interface{})

func (*FileLogger) Info

func (p *FileLogger) Info(format string, args ...interface{})

func (*FileLogger) Warn

func (p *FileLogger) Warn(format string, args ...interface{})

type Logger

type Logger interface {
	Debug(format string, args ...interface{})
	Warn(format string, args ...interface{})
	Info(format string, args ...interface{})
	Error(format string, args ...interface{})
	Close()
}

func NewFileLogger

func NewFileLogger(name string, level int) (Logger, error)

func NewStdoutLogger

func NewStdoutLogger(level int) Logger

func NewSyslogLogger

func NewSyslogLogger(tag string, level int) (Logger, error)

func Open

func Open(env string) Logger

type StdoutLogger

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

func (*StdoutLogger) Close

func (p *StdoutLogger) Close()

func (*StdoutLogger) Debug

func (p *StdoutLogger) Debug(format string, args ...interface{})

func (*StdoutLogger) Error

func (p *StdoutLogger) Error(format string, args ...interface{})

func (*StdoutLogger) Info

func (p *StdoutLogger) Info(format string, args ...interface{})

func (*StdoutLogger) Warn

func (p *StdoutLogger) Warn(format string, args ...interface{})

type SyslogLogger

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

func (*SyslogLogger) Close

func (p *SyslogLogger) Close()

func (*SyslogLogger) Debug

func (p *SyslogLogger) Debug(format string, args ...interface{})

func (*SyslogLogger) Error

func (p *SyslogLogger) Error(format string, args ...interface{})

func (*SyslogLogger) Info

func (p *SyslogLogger) Info(format string, args ...interface{})

func (*SyslogLogger) Warn

func (p *SyslogLogger) Warn(format string, args ...interface{})

Jump to

Keyboard shortcuts

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