logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ApplicationName = "lbclient"

ApplicationName : name of the application (possible preffix usage)

Variables

This section is empty.

Functions

func Debug

func Debug(format string, v ...interface{})

Debug : log with the DEBUG logging level

func Error

func Error(format string, v ...interface{})

Error : log with the ERROR logging level

func Fatal

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

Fatal : log with the FATAL logging level

func Info

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

Info : log with the INFO logging level

func LOG

func LOG(level Level, logToFile bool, format string, v ...interface{})

LOG : logging function

func LOGC

func LOGC(level Level, format string, v ...interface{})

LOGC : logging function (logs only to the console)

func SetLevel

func SetLevel(level Level)

SetLevel : sets the logging level for the application

func SetLevelByString

func SetLevelByString(lvlstr string)

SetLevelByString : sets the logger level based on a string [TRACE, WARN, DEBUG, INFO, ERROR, FATAL]. Will default to INFO if the given parameter is not valid or an error occurs.

func Trace

func Trace(format string, v ...interface{})

Trace : log with the TRACE logging level

func Warn

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

Warn : log with the WARN logging level

Types

type Level

type Level int

Level : lumber logging levels wrapper

const (
	TRACE Level = iota
	DEBUG
	INFO
	WARN
	ERROR
	FATAL
)

Supported levels of logging

func GetLevel

func GetLevel() Level

GetLevel : gets the logging level for the application

Jump to

Keyboard shortcuts

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