Documentation
¶
Index ¶
- Variables
- func Blue(text string) string
- func Bluef(text string, args ...any) string
- func Bold(text string, args ...any) string
- func Debug(format string)
- func Debugf(format string, args ...any)
- func Error(format string)
- func Errorf(format string, args ...any)
- func Fatal(format string)
- func Fatalf(format string, args ...any)
- func Formatf(cf func(string, ...any) string, format string, args ...any) string
- func Green(text string) string
- func Greenf(text string, args ...any) string
- func Info(format string)
- func Infof(format string, args ...any)
- func IsConsole() bool
- func Magenta(text string) string
- func Magentaf(text string, args ...any) string
- func PrinterInit(conf Config) error
- func Printf(cf func(string, ...any) string, format string, args ...any)
- func Red(text string) string
- func RedOnWhite(text string) string
- func RedOnWhitef(text string, args ...any) string
- func Redf(text string, args ...any) string
- func Verbose(format string, args ...any)
- func Warn(format string)
- func Warnf(format string, args ...any)
- func Yellow(text string) string
- func Yellowf(text string, args ...any) string
- type Config
- type LogLevel
- type PrintMode
- type Printer
Constants ¶
This section is empty.
Variables ¶
View Source
var PrintConfig = Config{ NormalMode, InfoLevel, "", false, false, false, }
Functions ¶
func PrinterInit ¶
PrinterInit initializes the global logger based on PrintConfig.Mode
func RedOnWhite ¶
RedOnWhite returns red text on white background
func RedOnWhitef ¶
RedOnWhite returns red text on white background
Types ¶
type Printer ¶
type Printer interface {
Debugf(format string, args ...any)
Infof(format string, args ...any)
Warnf(format string, args ...any)
Errorf(format string, args ...any)
Fatalf(format string, args ...any)
Debug(format string)
Info(format string)
Warn(format string)
Error(format string)
Fatal(format string)
}
var GlobalPrinter Printer = colorConsole
func NewConsoleColorPrinter ¶
func NewConsoleColorPrinter() Printer
func NewConsoleRawPrinter ¶
func NewConsoleRawPrinter() Printer
func NewLoggerPrinter ¶
func NewLoggerPrinter() Printer
Click to show internal directories.
Click to hide internal directories.