log

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package log implements leveled logging.

Index

Constants

View Source
const (
	DEBUG int = iota
	INFO
	WARN
	ERROR
)

Level

Variables

This section is empty.

Functions

func Colored

func Colored(color string, text string) string

Colored returns text in color.

func Debug

func Debug(a ...interface{}) error

Debug logs message with level DEBUG.

func Debugf added in v0.1.9

func Debugf(format string, a ...interface{}) error

Debugf formats and logs message with level DEBUG.

func Disable added in v0.1.2

func Disable()

Disable the logging.

func Enable added in v0.1.2

func Enable()

Enable the logging.

func Error

func Error(a ...interface{}) error

Error logs message with level ERROR.

func Errorf added in v0.1.9

func Errorf(format string, a ...interface{}) error

Errorf formats and logs message with level ERROR.

func Fatal

func Fatal(a ...interface{})

Fatal and logs message with level FATAL.

func Fatalf added in v0.1.9

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

Fatalf formats and logs message with level FATAL.

func Info

func Info(a ...interface{}) error

Info logs message with level INFO.

func Infof added in v0.1.9

func Infof(format string, a ...interface{}) error

Infof formats and logs message with level INFO.

func SetColored

func SetColored(b bool)

SetColored sets the color enability.

func SetLevel

func SetLevel(l int)

SetLevel sets the logging level.

func SetWriter

func SetWriter(writer io.Writer)

SetWriter sets the writer.

func Warn

func Warn(a ...interface{}) error

Warn logs message with level WARN.

func Warnf added in v0.1.9

func Warnf(format string, a ...interface{}) error

Warnf formats and logs message with level WARN.

Types

This section is empty.

Jump to

Keyboard shortcuts

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