logger

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlagVerboseCount int  // -V, -VV, -VVV
	FlagQuiet        bool // --quiet/-q
	FlagSilent       bool // --silent/-s
	FlagJSON         bool // optionnel pour CI
)

Functions

func Configure added in v0.1.6

func Configure(opts Options)

Configure sets up the global logger.

func ConfigureLoggerFromFlags added in v0.1.6

func ConfigureLoggerFromFlags()

func CreateTable

func CreateTable(headers []string) *tablewriter.Table

func Debug

func Debug(msg string, args ...interface{})

func Fatal added in v0.2.0

func Fatal(msg string, args ...interface{})

func Info

func Info(msg string, args ...interface{})

func LogError

func LogError(msg string, args ...interface{})

func Out added in v0.1.6

func Out() io.Writer

Out returns the current output writer (for tables).

func RenderRow added in v0.2.0

func RenderRow(table *tablewriter.Table, name, ver, status, pkgType string) error

func SetLevel

func SetLevel(level string)

SetLevel adjusts current level at runtime ("debug","info","warn","error").

func SetOutput added in v0.1.6

func SetOutput(w io.Writer)

SetOutput replaces the logger writer (use io.Discard in tests).

func Success

func Success(msg string, args ...interface{})

func UseTestMode added in v0.1.6

func UseTestMode()

UseTestMode silences logs during tests.

func Warn

func Warn(msg string, args ...interface{})

func WarnInline

func WarnInline(msg string, args ...interface{})

Types

type Options added in v0.1.6

type Options struct {
	Level string    // "debug","info","warn","error"
	JSON  bool      // JSON output (CI)
	Color bool      // colorize (console)
	Out   io.Writer // default os.Stdout
}

Jump to

Keyboard shortcuts

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