log

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const Console = 3
View Source
const Crit = 1
View Source
const Debug = 4
View Source
const Err = 2
View Source
const File = 2
View Source
const Info = 0
View Source
const MB = 1048576
View Source
const None = -1
View Source
const System = 1
View Source
const Trace = 5
View Source
const Undefined = 0
View Source
const Warning = 3

Variables

View Source
var DefaultLogger *log.Logger

DefaultLogger is the default Zabbix agent 2 and Zabbix web service logger.

Functions

func Caller

func Caller() (name string)

func CheckLogLevel

func CheckLogLevel(level int) bool

func Critf

func Critf(format string, args ...interface{})

func Debugf

func Debugf(format string, args ...interface{})

func DecreaseLogLevel

func DecreaseLogLevel() (success bool)

func Errf

func Errf(format string, args ...interface{})

func IncreaseLogLevel

func IncreaseLogLevel() (success bool)

func Infof

func Infof(format string, args ...interface{})

func Level

func Level() string

func Open

func Open(logType int, level int, filename string, filesize int) error

Open sets a new logger based on the log type and a new log output level

func PanicHook

func PanicHook()

func Tracef

func Tracef(format string, args ...interface{})

func Warningf

func Warningf(format string, args ...interface{})

Types

type LogStat

type LogStat struct {
	// contains filtered or unexported fields
}

type Logger

type Logger interface {
	Tracef(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Warningf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Errf(format string, args ...interface{})
	Critf(format string, args ...interface{})
}

func New

func New(module string) Logger

Jump to

Keyboard shortcuts

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