logboek

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

README

logboek

Logging library for cli utils.

Documentation

Index

Constants

View Source
const DefaultWidth = 140

Variables

This section is empty.

Functions

func ColorizeBase

func ColorizeBase(a ...interface{}) string

func ColorizeFail

func ColorizeFail(a ...interface{}) string

func ColorizeHighlight

func ColorizeHighlight(a ...interface{}) string

func ColorizeInfo

func ColorizeInfo(a ...interface{}) string

func ColorizeNone

func ColorizeNone(a ...interface{}) string

func ColorizeSuccess

func ColorizeSuccess(a ...interface{}) string

func ColorizeWarning

func ColorizeWarning(a ...interface{}) string

func ContentWidth

func ContentWidth() int

func DisableLogColor

func DisableLogColor()

func DisablePrettyLog

func DisablePrettyLog()

func EnableLogColor

func EnableLogColor()

func ErrF

func ErrF(format string, a ...interface{}) (int, error)

func FitText

func FitText(text string, options FitTextOptions) string

func GetErrStream

func GetErrStream() io.Writer

func GetOutStream

func GetOutStream() io.Writer

func GetRawStreamsOutputMode

func GetRawStreamsOutputMode() bool

func IndentDown

func IndentDown()

func IndentUp

func IndentUp()

func Init

func Init() error

func LogBlock added in v0.1.1

func LogBlock(blockMessage string, options LogBlockOptions, blockFunc func())

func LogErrorF

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

func LogErrorLn

func LogErrorLn(a ...interface{})

func LogF

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

func LogHighlightF

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

func LogHighlightLn

func LogHighlightLn(a ...interface{})

func LogInfoF

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

func LogInfoLn

func LogInfoLn(a ...interface{})

func LogLn

func LogLn(a ...interface{})

func LogOptionalLn

func LogOptionalLn()

func LogProcess

func LogProcess(processMessage string, options LogProcessOptions, processFunc func() error) error

func LogProcessEnd

func LogProcessEnd(options LogProcessEndOptions)

func LogProcessFail

func LogProcessFail(options LogProcessEndOptions)

func LogProcessInline

func LogProcessInline(processMessage string, options LogProcessInlineOptions, processFunc func() error) error

func LogProcessStart

func LogProcessStart(processMessage string, options LogProcessStartOptions)

func LogProcessStepEnd

func LogProcessStepEnd(processMessage string, options LogProcessStepEndOptions)

func MuteErr

func MuteErr()

func MuteOut

func MuteOut()

func OutF

func OutF(format string, a ...interface{}) (int, error)

func RawStreamsOutputModeOff

func RawStreamsOutputModeOff()

func RawStreamsOutputModeOn

func RawStreamsOutputModeOn()

func SetBaseFormat

func SetBaseFormat(attributes []color.Attribute)

func SetFailFormat

func SetFailFormat(attributes []color.Attribute)

func SetHighlightFormat

func SetHighlightFormat(attributes []color.Attribute)

func SetInfoFormat

func SetInfoFormat(attributes []color.Attribute)

func SetTag

func SetTag(value string, colorizeFunc func(...interface{}) string)

func SetWarningFormat

func SetWarningFormat(attributes []color.Attribute)

func SetWidth

func SetWidth(value int)

func UnmuteErr

func UnmuteErr()

func UnmuteOut

func UnmuteOut()

func WithIndent

func WithIndent(f func() error) error

func WithRawStreamsOutputModeOn

func WithRawStreamsOutputModeOn(f func() error) error

func WithTag

func WithTag(value string, colorizeFunc func(...interface{}) string, f func() error) error

func WithoutIndent

func WithoutIndent(decoratedFunc func() error) error

Types

type FitTextOptions

type FitTextOptions struct {
	ExtraIndentWidth int
	Width            int
	MaxWidth         int
	MarkWrappedLine  bool
}

type LogBlockOptions added in v0.1.1

type LogBlockOptions struct {
	WithIndent           bool
	WithoutLogOptionalLn bool
	ColorizeMsgFunc      func(...interface{}) string
}

type LogProcessEndOptions

type LogProcessEndOptions struct {
	WithoutLogOptionalLn bool
	ColorizeMsgFunc      func(...interface{}) string
}

type LogProcessInlineOptions

type LogProcessInlineOptions struct {
	ColorizeMsgFunc func(...interface{}) string
}

type LogProcessOptions

type LogProcessOptions struct {
	WithIndent             bool
	WithoutLogOptionalLn   bool
	InfoSectionFunc        func(err error)
	SuccessInfoSectionFunc func()
	ColorizeMsgFunc        func(...interface{}) string
}

type LogProcessStartOptions

type LogProcessStartOptions struct {
	ColorizeMsgFunc func(...interface{}) string
}

type LogProcessStepEndOptions

type LogProcessStepEndOptions struct {
	WithIndent      bool
	InfoSectionFunc func(err error)
	ColorizeMsgFunc func(...interface{}) string
}

type WriterProxy

type WriterProxy struct {
	io.Writer
}

func (WriterProxy) Write

func (p WriterProxy) Write(data []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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