logging

package
v0.0.0-...-3f89074 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogColors = map[LogLevel]int{}

Functions

func Console

func Console(ctx context.Context, level LogLevel, text string)

func LogDiscord

func LogDiscord(settings *config.Settings, level LogLevel, message string) error

func LogDiscordUpdate

func LogDiscordUpdate(settings *config.Settings, level LogLevel, message string, id *int, screenshot *image.RGBA) (*int, error)

Types

type LogLevel

type LogLevel string
const (
	Info    LogLevel = "INFO"
	Warning LogLevel = "WARNING"
	Success LogLevel = "SUCCESS"
	Error   LogLevel = "ERROR"
)

type Logger

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

func NewLogger

func NewLogger(name string, settings *config.Object[config.Settings]) *Logger

func (*Logger) Child

func (s *Logger) Child(name string) *Logger

func (*Logger) Log

func (s *Logger) Log(verbosity int, level LogLevel, message string) error

func (*Logger) LogDiscord

func (s *Logger) LogDiscord(level LogLevel, message string, id *int, screenshot *image.RGBA) (int, error)

Jump to

Keyboard shortcuts

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