log

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bold added in v0.6.0

func Bold(a ...interface{})

Bold log text.

func Boldf added in v0.6.0

func Boldf(format string, a ...interface{})

Boldf log text with format.

func Debug

func Debug(a ...interface{})

Debug logs a debug message

func Debugf

func Debugf(format string, a ...interface{})

Debugf logs a debug message

func Error

func Error(a ...interface{})

Error logs an error message

func Errorf

func Errorf(format string, a ...interface{})

Errorf logs a debug message

func Fields

func Fields(mapper FieldMapper)

Fields logs key value pairs formatted in sections

func Highlight

func Highlight(a ...interface{})

Highlight log as highlighted text

func Highlightf

func Highlightf(format string, a ...interface{})

Highlightf log as highlighted text

func Info

func Info(a ...interface{})

Info logs an info message

func Infof

func Infof(format string, a ...interface{})

Infof logs a debug message

func IsVerbose added in v0.10.0

func IsVerbose() bool

IsVerbose logging turned on

func Print added in v0.5.0

func Print(a ...interface{})

Print is effectively a pass-through to fmt.Print

func Regular

func Regular(a ...interface{})

Regular log for body style text

func Regularf

func Regularf(format string, a ...interface{})

Regularf log for body style text

func SetEcho added in v0.5.0

func SetEcho(echo bool)

SetEcho mode for logger

func SetTheme added in v0.9.9

func SetTheme(theme ThemeType)

SetTheme for logger

func SetVerbose added in v0.5.0

func SetVerbose(verbose bool)

SetVerbose for logger

func Table

func Table(mapper FieldMapper)

Table logs key value pairs as a table with keys for the header

func ThemeToString added in v0.9.9

func ThemeToString(theme ThemeType) string

ThemeToString conversion from ThemeType to string

func Warning

func Warning(a ...interface{})

Warning logs a warning message

func Warningf

func Warningf(format string, a ...interface{})

Warningf logs a debug message

Types

type FieldMapper

type FieldMapper interface {
	Keys() []string
	Fields() map[string]interface{}
}

FieldMapper type returns fields as a map for logging

type ThemeType added in v0.9.9

type ThemeType int
const (
	DefaultTheme ThemeType = iota
	GrayscaleTheme
	EmojiTheme
)

func ThemeFromString added in v0.9.9

func ThemeFromString(theme string) ThemeType

ThemeToString conversion from string to ThemeType

Jump to

Keyboard shortcuts

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