log

package
v0.0.0-...-83fd405 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelEmergency = iota
	LevelAlert
	LevelCritical
	LevelError
	LevelWarning
	LevelNotice
	LevelInformational
	LevelDebug
)

Variables

This section is empty.

Functions

func Debug

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

func Error

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

func Info

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

func SetLogLevel

func SetLogLevel(level int)

func SetLogger

func SetLogger(l ILogger)

func Warn

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

Types

type ConsoleLogger

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

func (ConsoleLogger) Close

func (ConsoleLogger) Close()

func (ConsoleLogger) Debug

func (cl ConsoleLogger) Debug(format string, args ...interface{})

func (ConsoleLogger) Error

func (cl ConsoleLogger) Error(format string, args ...interface{})

func (ConsoleLogger) Info

func (cl ConsoleLogger) Info(format string, args ...interface{})

func (*ConsoleLogger) SetLevel

func (cl *ConsoleLogger) SetLevel(level int)

func (ConsoleLogger) Warn

func (cl ConsoleLogger) Warn(format string, args ...interface{})

type ILogger

type ILogger interface {
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Warn(format string, args ...interface{})
	Error(format string, args ...interface{})
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	SetLevel(int)
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	Close()
}

func New

func New(logDir string, logFileBaseName string) ILogger

func NewConsoleLogger

func NewConsoleLogger() (logger ILogger)

func NewConsoleLoggerWithSign

func NewConsoleLoggerWithSign(sign string) (l ILogger)

Jump to

Keyboard shortcuts

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