logger

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(logLevel LogLevel)

Init sets global LogLevel to a new value any Loglevel that is equal or lower will be logged lvl meaning ______________________________________________ 0 Emergency: system is unusable 1 Alert: action must be taken immediately 2 Critical: critical conditions 3 Error: error conditions 4 Warning: warning conditions 5 Notice: normal but significant condition 6 Informational: informational messages 7 Debug: debug-level messages

func Log

func Log(lvl LogLevel, flowID string, format string, values ...interface{})

Log logs a message with given LogLevel

func LogAlert

func LogAlert(flowID string, format string, values ...interface{})

LogAlert logs a message with CRITICAL log level

func LogCritical

func LogCritical(flowID string, format string, values ...interface{})

LogCritical logs a message with CRITICAL log level

func LogDebug

func LogDebug(flowID string, format string, values ...interface{})

LogDebug logs a message with DEBUG log level

func LogEmergency

func LogEmergency(flowID string, format string, values ...interface{})

LogEmergency logs a message with EMERGENCY log level

func LogError

func LogError(flowID string, format string, values ...interface{})

LogError logs a message with ERROR log level

func LogInfo

func LogInfo(flowID string, format string, values ...interface{})

LogInfo logs a message with INFO log level

func LogNotice

func LogNotice(flowID string, format string, values ...interface{})

LogNotice logs a message with ERROR log level

func LogS

func LogS(lvl LogLevel, skip int, flowID string, format string, values ...interface{})

LogS logs a message with given LogLevel and additional skip (relative to the default behavior

func LogWarning

func LogWarning(flowID string, format string, values ...interface{})

LogWarning logs a message with WARNING log level

Types

type LogLevel

type LogLevel int
const (
	NoLog         LogLevel = -1   //turn off logs if used for Init and NoOp if used for Log
	Emergency     LogLevel = iota //Emergency: system is unusable
	Alert         LogLevel = iota //Alert: action must be taken immediately
	Critical      LogLevel = iota //Critical: critical conditions
	Error         LogLevel = iota //Error: error conditions
	Warning       LogLevel = iota //Warning: warning conditions
	Notice        LogLevel = iota //Notice: normal but significant condition
	Informational LogLevel = iota //Informational: informational messages
	Debug         LogLevel = iota //Debug: debug-level messages

)

Jump to

Keyboard shortcuts

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