format

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2019 License: Apache-2.0 Imports: 2 Imported by: 15

Documentation

Index

Constants

View Source
const (
	// Full indicates a verbose printing style
	Full = uint8(0)
	// Partial indicates a simplified printing style
	Partial = uint8(1)
	// Min indicates a minimal printing style
	Min = uint8(2)
	// Un indicated a Full style without colors
	Un = uint8(3)
)

Variables

View Source
var Debug = Style{"099", level.Debug, "DEBUG", "✚"}

Debug style used for prints

View Source
var Error = Style{"208", level.Error, "ERROR", "✗"}

Error style used for prints

View Source
var Fatal = Style{"160", level.Fatal, "FATAL", "🕱"}

Fatal style used for prints

View Source
var Good = Style{"040", level.Good, "GOOD", "🗸"}

Good style used for prints

View Source
var Info = Style{"045", level.Info, "INFO", "⮞"}

Info style used for prints

View Source
var Panic = Style{"200", level.Panic, "PANIC", "☢"}

Panic style used for prints

View Source
var Warn = Style{"220", level.Warn, "WARNING", "🗲"}

Warn style used for prints

Functions

This section is empty.

Types

type Style

type Style struct {
	Color  string
	Level  uint8
	Msg    string
	Symbol string
}

Style is a style definition used for prints

func (Style) Full

func (s Style) Full(time string, v ...interface{}) string

Full prints a complete log message, with a timestep and label for message type

func (Style) Min

func (s Style) Min(v ...interface{}) string

Min prints a simplified log message, with only an icon for message type

func (Style) Partial added in v1.0.5

func (s Style) Partial(time string, v ...interface{}) string

Partial prints a partial log message, with a timestep and icon for message type

func (Style) Un

func (s Style) Un(time string, v ...interface{}) string

Un prints a Full-style log message, without colors

Jump to

Keyboard shortcuts

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