log

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colorize

func Colorize(colour Colour, format string) string

func Debug

func Debug(format string, v ...interface{})

func Error

func Error(format string, v ...interface{})

func Fatal

func Fatal(v ...interface{})

func Fatalf

func Fatalf(format string, v ...interface{})

func Info

func Info(format string, v ...interface{})

func Log

func Log(l LogLevel, format string, v ...interface{})

func SetLevel

func SetLevel(l LogLevel)

func Trace

func Trace(format string, v ...interface{})

func Warn

func Warn(format string, v ...interface{})

Types

type Colour

type Colour int
const (
	BLACK Colour = iota
	BLUE
	RED
	GREEN
	GREY
	YELLOW
	MAGENTA
	CYAN
	WHITE
	LIGHTBLACK
	LIGHTRED
	LIGHTGREEN
	LIGHTYELLOW
	LIGHTBLUE
	LIGHTMAGENTA
	LIGHTCYAN
	LIGHTWHITE
)

type LogLevel

type LogLevel int
const (
	TRACE LogLevel = iota
	DEBUG
	INFO
	WARN
	ERROR
	FATAL
)

type MuxyLogger

type MuxyLogger struct {
	log.Logger
	Level LogLevel
}

Logging facility

func NewLogger

func NewLogger() *MuxyLogger

func (*MuxyLogger) Debug

func (m *MuxyLogger) Debug(format string, v ...interface{})

func (*MuxyLogger) Error

func (m *MuxyLogger) Error(format string, v ...interface{})

func (*MuxyLogger) Fatal

func (m *MuxyLogger) Fatal(v ...interface{})

func (*MuxyLogger) Fatalf

func (m *MuxyLogger) Fatalf(format string, v ...interface{})

func (*MuxyLogger) Info

func (m *MuxyLogger) Info(format string, v ...interface{})

func (*MuxyLogger) Log

func (m *MuxyLogger) Log(l LogLevel, format string, v ...interface{})

func (*MuxyLogger) SetLevel

func (m *MuxyLogger) SetLevel(l LogLevel)

func (*MuxyLogger) Trace

func (m *MuxyLogger) Trace(format string, v ...interface{})

func (*MuxyLogger) Warn

func (m *MuxyLogger) Warn(format string, v ...interface{})

Jump to

Keyboard shortcuts

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