logger

package
v0.57.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 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 ...interface{})

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

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 ...interface{})

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

Jump to

Keyboard shortcuts

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