log

package
v0.0.0-...-1f7c32f Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2017 License: BSD-2-Clause Imports: 2 Imported by: 34

Documentation

Index

Constants

View Source
const (
	//Min the least verbose log level and default level.
	//More or less only errors and important warnings.
	Min = 0
	//Verbose is more verbose usefull for informing a user.
	Verbose = 1
	//DebugMsg use for debugging messages flow.
	DebugMsg = 2 //TODO change flag commont
	//Debug full information for debugging.
	Debug = 3
)

Variables

This section is empty.

Functions

func ErrNo

func ErrNo(no int) string

ErrNo just create the string ErrNo no.

func InitLog

func InitLog(level int)

InitLog sets the logging level is not thread safe.

func Level

func Level() int

Level returns the current logging level.

func Print

func Print(level int, v ...interface{})

Print log text depending on level if level equal to current log level or belove the text is logged. Works as fmt.Print.

func PrintErr

func PrintErr(err error)

PrintErr log the err to os. standard error.

func Printf

func Printf(level int, format string, v ...interface{})

Printf log text depending on level if level equal to current log level or belove the text is logged. Works as fmt.Printf.

func Println

func Println(level int, v ...interface{})

Println log text depending on level if level equal to current log level or belove the text is logged. Works as fmt.Println.

Types

This section is empty.

Jump to

Keyboard shortcuts

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