logger

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: GPL-3.0 Imports: 3 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// CRITICAL errors
	CRITICAL = iota
	// SEVERE errors
	SEVERE
	// ERROR message
	ERROR
	// WARN for warning messages
	WARN
	// INFO is for informational messages
	INFO
	// DBG for debug messages
	DBG

	// ROTATE log file command
	ROTATE = iota // rotate log file
)

Variables

This section is empty.

Functions

func GetLogLevel

func GetLogLevel() int

GetLogLevel returns a numeric log level.

func GetLogLevelName

func GetLogLevelName() string

GetLogLevelName returns the current loglevel in human-readable form.

func LogToFile

func LogToFile(filename string) bool

LogToFile starts logging messages to file.

func Printf

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

Printf punches formatted logging data for givel level

func Println

func Println(level int, line string)

Println punches logging data for given level.

func Rotate

func Rotate()

Rotate log file.

func SetLogLevel

func SetLogLevel(lvl int)

SetLogLevel sets the logging level from numeric value

func SetLogLevelFromName

func SetLogLevelFromName(name string)

SetLogLevelFromName sets the logging level from symbolic name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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