logger

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DieIf

func DieIf(err error)

DieIf outputs log and exit(1) if `err` occurs.

func ErrorIf

func ErrorIf(err error) bool

ErrorIf outputs log if `err` occurs.

func Log

func Log(prefix, message string)

Log outputs `message` with `prefix` by go-colorine

func Logf added in v0.35.0

func Logf(prefix, message string, args ...any)

Logf outputs `message` with `prefix` by go-colorine

func SetQuiet added in v0.64.0

func SetQuiet(q bool)

SetQuiet enables or disables quiet mode on the default logger.

Types

type Logger added in v0.38.0

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

Logger is wrapped go-colorine logger for mkr

func New added in v0.38.0

func New() *Logger

New is constructor for new colorine logger

func (*Logger) Error added in v0.38.0

func (l *Logger) Error(err error)

Error outputs log given non-nil `err`

func (*Logger) Log added in v0.38.0

func (l *Logger) Log(prefix, message string)

Log outputs `message` with `prefix` by go-colorine

func (*Logger) Logf added in v0.38.0

func (l *Logger) Logf(prefix, message string, args ...any)

Logf outputs `message` with `prefix` by go-colorine

func (*Logger) SetQuiet added in v0.64.0

func (l *Logger) SetQuiet(q bool)

SetQuiet enables or disables quiet mode. In quiet mode, info-level log messages are suppressed.

Jump to

Keyboard shortcuts

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