logging

package
v0.0.0-...-a16d91a Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Black = chalk.Black
	Black = iota
	// Red = chalk.Red
	Red
	// Green = chalk.Green
	Green
	// Yellow = chalk.Yellow
	Yellow
	// Blue = chalk.Blue
	Blue
	// Magenta = chalk.Magenta
	Magenta
	// Cyan = chalk.Cyan
	Cyan
	// White = chalk.White
	White
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LeveledLogger

type LeveledLogger interface {
	Errorf(string, ...interface{})
	Warnf(string, ...interface{})
	Infof(string, ...interface{})
	Debugf(string, ...interface{})
}

LeveledLogger is a logger that allows Errorf, etc.. logging.

type Logger

type Logger struct {
	*log.Logger
}

Logger wraps the golang log.Logger struct for coloring

func New

func New(name string, colorFlag uint) *Logger

New retrurns a new logger

func (*Logger) Debugf

func (logger *Logger) Debugf(format string, items ...interface{})

Debugf sends the output colored

func (*Logger) Errorf

func (logger *Logger) Errorf(format string, items ...interface{})

Errorf sends the output colored

func (*Logger) Infof

func (logger *Logger) Infof(format string, items ...interface{})

Infof sends the output colored

func (*Logger) Warnf

func (logger *Logger) Warnf(format string, items ...interface{})

Warnf sends the output colored

Jump to

Keyboard shortcuts

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