log

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 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 Config

type Config struct {
	Verbose bool
	Debug   bool
}

Config holds logging configuration

type Logger

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

Logger provides logging functionality

func New

func New(config Config) *Logger

New creates a new logger with the given configuration

func (*Logger) Debug added in v0.7.1

func (l *Logger) Debug(format string, args ...interface{})

Debug prints a message if debug mode is enabled

func (*Logger) Error

func (l *Logger) Error(format string, args ...interface{})

Error prints an error message and exits

func (*Logger) Print

func (l *Logger) Print(format string, args ...interface{})

Print always prints a message (used for required output)

func (*Logger) PrintErr

func (l *Logger) PrintErr(format string, args ...interface{})

PrintErr always prints to stderr (used for required errors/warnings)

func (*Logger) Verbose

func (l *Logger) Verbose(format string, args ...interface{})

Verbose prints a message if verbose mode is enabled

func (*Logger) Warning

func (l *Logger) Warning(format string, args ...interface{})

Warning prints a warning message to stderr if verbose mode is enabled

Jump to

Keyboard shortcuts

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