log

package module
v0.0.0-...-67b18b8 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 4 Imported by: 3

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() (l 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