verbprint

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VerboseLogger

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

func New

func New(verbosityLevel int, logger *log.Logger, color int) *VerboseLogger

New returns a new VerboseLogger. You will need to call InitColor() in order to use colors.

func (*VerboseLogger) InitColor

func (v *VerboseLogger) InitColor()

! Deprecated, initColor is now called automatically

func (*VerboseLogger) PrintW

func (v *VerboseLogger) PrintW(minLevel int) io.Writer

func (*VerboseLogger) Printf

func (v *VerboseLogger) Printf(minLevel int, format string, msg ...any)

If verbosityLevel is >= minLevel, the message will be printed. Appends the level to the message with optional coloring. All other arguments are handled in the manner of fmt.Printf

func (*VerboseLogger) Println

func (v *VerboseLogger) Println(minLevel int, msg ...any)

If verbosityLevel is >= minLevel, the message will be printed. Appends the level to the message with optional coloring. All other arguments are handled in the manner of fmt.Println

func (*VerboseLogger) PrintlnC

func (v *VerboseLogger) PrintlnC(minLevel int, msg ...any)

If verbosityLevel is >= minLevel, the message will be printed. All other arguments are handled in the manner of fmt.Println

Jump to

Keyboard shortcuts

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