logger

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogEvent                = events.EventName("LogEvent")
	ErrorEvent              = events.EventName("ErrorEvent")
	RegisterCommandEvent    = events.EventName("RegisterCommandEvent")
	CommandPreProccessEvent = events.EventName("CommandPreProccessEvent")
	PanicEvent              = events.EventName("PanicEvent")
)

Variables

This section is empty.

Functions

func CommandInfo

func CommandInfo(message string)

func Debug

func Debug(lvl int, printStackTrace bool, data ...any)

func Error

func Error(err error)

func GetAllCommands

func GetAllCommands() map[string]Command

func Info

func Info(message string)

func Panic

func Panic(err error)

func Print

func Print(message string)

func RegisterCommand

func RegisterCommand(command Command)

func SetDebugLevel

func SetDebugLevel(level int)

func SetLogs

func SetLogs(value bool)

func SetLogsDir added in v1.1.0

func SetLogsDir(path string)

func Warning

func Warning(message string)

Types

type Command

type Command struct {
	Name        string
	Description string
	Aliases     []string
	Execute     func(string, []string)
}

Jump to

Keyboard shortcuts

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