logger

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Black   string = "\x1b[30m"
	Red     string = "\x1b[31m"
	Green   string = "\x1b[32m"
	Yellow  string = "\x1b[33m"
	Blue    string = "\x1b[34m"
	Magenta string = "\x1b[35m"
	Cyan    string = "\x1b[36m"
	White   string = "\x1b[37m"
	Reset   string = "\x1b[0m"
)

Text colors

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}
var Log *Logger = New(os.Stdout)

func New

func New(out io.Writer) *Logger

Returns a new console logger

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

Logs error

func (*Logger) Errorf

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

func (*Logger) Fatal

func (l *Logger) Fatal(v ...interface{})

Fatal is equivalent to l.Print() followed by a call to os.Exit(1).

func (*Logger) Fatalf

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

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

Logs info

func (*Logger) Infof

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

func (*Logger) Log

func (l *Logger) Log(v ...interface{})

Logs log

func (*Logger) Logf

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

func (*Logger) Output

func (l *Logger) Output(s string) error

Print output to logger output writer

func (*Logger) Panic

func (l *Logger) Panic(v ...interface{})

func (*Logger) Panicf

func (l *Logger) Panicf(format string, v ...interface{})

func (*Logger) Printf

func (l *Logger) Printf(format string, v ...interface{})

Arguments are handled in the manner of fmt.Printf.

func (*Logger) Warn

func (l *Logger) Warn(v ...interface{})

Logs warning

func (*Logger) Warnf

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

Jump to

Keyboard shortcuts

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