logger

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HEADER    string = "\033[95m"
	OKBLUE    string = "\033[94m"
	OKCYAN    string = "\033[96m"
	OKGREEN   string = "\033[92m"
	WARNING   string = "\033[93m"
	FAIL      string = "\033[91m"
	ENDC      string = "\033[0m"
	BOLD      string = "\033[1m"
	UNDERLINE string = "\033[4m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BotLogger

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

func InitTheLogger

func InitTheLogger(botCfg *cfg.BotConfigs) *BotLogger

InitiTheLogger initializes the default logger of the bot.

func (*BotLogger) Color

func (l *BotLogger) Color()

Color adds color to the logs.

func (*BotLogger) GetRaw

func (l *BotLogger) GetRaw() *log.Logger

GetRaw returns the internal logger

func (*BotLogger) Log

func (l *BotLogger) Log(header, space, content, after, headerColor, contentColor, afterColor string)

Log logs the given paramteres based on the defined format.

func (*BotLogger) Uncolor

func (l *BotLogger) Uncolor()

Uncolor, clears the colors of the logs.

Jump to

Keyboard shortcuts

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