log

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 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

Colorize returns a coloured log string

func Debug

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

Debug logging

func Error

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

Error logging

func Fatal

func Fatal(v ...interface{})

Fatal logging

func Fatalf

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

Fatalf is formatted fatal logging

func Info

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

Info logging

func Log

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

Log general log method

func SetLevel

func SetLevel(l Level)

SetLevel sets log level

func Trace

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

Trace logging

func Warn

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

Warn logging

Types

type Colour

type Colour int

Colour type to print in log messages

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

nolint

type Level added in v0.0.3

type Level int

Level to set

const (
	TRACE Level = iota
	DEBUG
	INFO
	WARN
	ERROR
	FATAL
)

nolint

type MuxyLogger

type MuxyLogger struct {
	log.Logger
	Level Level
}

MuxyLogger is the logging facility for Muxy

func NewLogger

func NewLogger() *MuxyLogger

NewLogger creates a new logger

func (*MuxyLogger) Debug

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

Debug logging

func (*MuxyLogger) Error

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

Error logging

func (*MuxyLogger) Fatal

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

Fatal logging

func (*MuxyLogger) Fatalf

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

Fatalf formatted fatal logging

func (*MuxyLogger) Info

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

Info loggig

func (*MuxyLogger) Log

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

Log is general log facility

func (*MuxyLogger) SetLevel

func (m *MuxyLogger) SetLevel(l Level)

SetLevel sets the log level

func (*MuxyLogger) Trace

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

Trace Logging

func (*MuxyLogger) Warn

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

Warn logging

Jump to

Keyboard shortcuts

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