log

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLILogger

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

CLILogger is a simple logger for command line applications that outputs colored logs

func NewCLILogger

func NewCLILogger(key string, verbose bool) *CLILogger

NewCLILogger creates a new instance of CLILogger with the specified key, verbosity and column width.

func (CLILogger) Debug

func (l CLILogger) Debug(format string, args ...any)

Debug outputs a debug log to the stdout if verbose mode is enabled

func (CLILogger) Error

func (l CLILogger) Error(err error)

Error outputs an error log to the stderr

func (CLILogger) Info

func (l CLILogger) Info(format string, args ...any)

Info outputs an info log to the stdout

func (CLILogger) Warn

func (l CLILogger) Warn(format string, args ...any)

Warn outputs a warning log to the stdout

Jump to

Keyboard shortcuts

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