log

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2016 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(format string, a ...interface{})

Debug 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(format string, a ...interface{})

Error logs message with level ERROR.

func Fatal

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

Fatal logs message with level FATAL.

func Info

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

Info 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 SetName

func SetName(s string)

SetName sets the logging name.

func SetWriter

func SetWriter(writer io.Writer)

SetWriter sets the writer.

func Warn

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

Warn 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