logger

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ColorNC          = "\x1b[0m" // No Color
	ColorWhite       = "\x1b[1;37m"
	ColorBlack       = "\x1b[0;30m"
	ColorBlue        = "\x1b[0;34m"
	ColorLightBlue   = "\x1b[1;34m"
	ColorGreen       = "\x1b[0;32m"
	ColorLightGreen  = "\x1b[1;32m"
	ColorCyan        = "\x1b[0;36m"
	ColorLightCyan   = "\x1b[1;36m"
	ColorRed         = "\x1b[0;31m"
	ColorLightRed    = "\x1b[1;31m"
	ColorPurple      = "\x1b[0;35m"
	ColorLightPurple = "\x1b[1;35m"
	ColorBrown       = "\x1b[0;33m"
	ColorYellow      = "\x1b[1;33m"
	ColorGrey        = "\x1b[0;30m"
	ColorLightGrey   = "\x1b[0;37m"
)

Variables

View Source
var (
	Silent  bool
	Verbose bool
	Color   bool
)

Functions

func Debug

func Debug(v ...interface{})

func Debugf

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

func Error

func Error(v ...interface{})

func Errorf

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

func Heading

func Heading(v ...interface{})

func Headingf

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

func Info

func Info(v ...interface{})

func Infof

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

func Log

func Log(l *log.Logger, color string, v ...interface{})

func Logf

func Logf(l *log.Logger, color, format string, v ...interface{})

func StdErrOutput

func StdErrOutput(b []byte) (n int, err error)

func Warn

func Warn(v ...interface{})

func Warnf

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

Types

type Writer

type Writer func(b []byte) (n int, err error)

io.Writer interface implementation. To use with error logs, pass StdErrOutput func: Writer(StdErrOutput) <- implements io.Writer

func (Writer) Write

func (w Writer) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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