logger

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	Out       chan string // Logger output channel for testing.
	Errors    int         //Non fatal error count.
	Warnings  int         //Warnings count.
	Verbosity int         // 0 => no verbosity; 1 => verbose; 2 => more verbose ...
}

func (*Log) Colorize

func (log *Log) Colorize(attributes []color.Attribute, format string, v ...any)

Colorize prints a colorized line to stdout.

func (*Log) Console

func (log *Log) Console(format string, v ...any)

Console prints a line to stdout.

func (*Log) Error

func (log *Log) Error(format string, v ...any)

Error prints a line to stderr and increments the error count.

func (*Log) Note added in v0.2.0

func (log *Log) Note(format string, v ...any)

Note prints a highlighted line to stderr.

func (*Log) Verbose

func (log *Log) Verbose(format string, v ...any)

Verbose prints a line to stdout if `-v` logVerbose option was specified.

func (*Log) Verbose2

func (log *Log) Verbose2(format string, v ...any)

Verbose2 prints a a line to stdout the `-v` verbose option was specified more than once.

func (*Log) Warning

func (log *Log) Warning(format string, v ...any)

Warning prints a line to stderr and increments the warnings count.

Jump to

Keyboard shortcuts

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