logger

package
v1.7.18 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 9 Imported by: 10

Documentation

Index

Constants

View Source
const (
	// LogLevelDebug raw log level
	LogLevelRaw = "RAW"
	// LogLevelDebug debug log level
	LogLevelDebug = "DEBUG"
	// LogLevelInfo info log level
	LogLevelInfo = "INFO"
	// LogLevelWarn warn log level
	LogLevelWarn = "WARN"
	// LogLevelError error log level
	LogLevelError = "ERROR"
)

Variables

View Source
var (
	DefaultLogPath        string
	DefaultEnabledLog     bool = false
	DefaultEnabledConsole bool = false
)

Functions

func NewXLog

func NewXLog() *xLog

NewXLog create new xLog

Types

type AppLog

type AppLog interface {
	SetLogPath(logPath string)
	SetEnabledConsole(enabled bool)
	SetEnabledLog(enabledLog bool)
	IsEnabledLog() bool
	Print(log string, logTarget string)
	Raw(log string, logTarget string)
	Debug(log string, logTarget string)
	Info(log string, logTarget string)
	Warn(log string, logTarget string)
	Error(log string, logTarget string)
}

func NewAppLog

func NewAppLog() AppLog

Jump to

Keyboard shortcuts

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