logger

package
v1.0.1-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultTerminalWidth = 140
)

Variables

This section is empty.

Functions

func DisableLogColor

func DisableLogColor()

func DisablePrettyLog

func DisablePrettyLog()

func EnableLogColor

func EnableLogColor()

func FitText

func FitText(text string, options FitTextOptions) string

func FormattedLogF

func FormattedLogF(w io.Writer, format string, a ...interface{}) (int, error)

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 IsTerminal

func IsTerminal() bool

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 LogProcess

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

func LogProcessEnd

func LogProcessEnd(options LogProcessEndOptions)

func LogProcessFail

func LogProcessFail(options LogProcessEndOptions)

func LogProcessInline

func LogProcessInline(msg string, processFunc func() error) error

func LogProcessStart

func LogProcessStart(msg string, options LogProcessStartOptions)

func LogProcessStepEnd

func LogProcessStepEnd(msg string)

func LogSecondaryProcess

func LogSecondaryProcess(msg string, options LogProcessOptions, processFunc func() error) error

func LogSecondaryProcessInline

func LogSecondaryProcessInline(msg string, processFunc func() error) error

func LogServiceF

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

func LogServiceLn

func LogServiceLn(a ...interface{})

func MuteErr

func MuteErr()

func MuteOut

func MuteOut()

func OptionalLnModeOn

func OptionalLnModeOn()

func RawStreamsOutputModeOff

func RawStreamsOutputModeOff()

func RawStreamsOutputModeOn

func RawStreamsOutputModeOn()

func SetTag

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

func SetTerminalWidth

func SetTerminalWidth(value int)

func TerminalContentWidth

func TerminalContentWidth() int

func TerminalWidth

func TerminalWidth() int

func UnmuteErr

func UnmuteErr()

func UnmuteOut

func UnmuteOut()

func WithFittedStreamsOutputOn

func WithFittedStreamsOutputOn(f func() error) error

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
	MaxWidth         int
	MarkWrappedLine  bool
}

type LogProcessEndOptions

type LogProcessEndOptions struct {
	WithoutLogOptionalLn bool
}

type LogProcessOptions

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

type LogProcessStartOptions

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

type LogProcessStepEndOptions

type LogProcessStepEndOptions struct {
	WithIndent      bool
	InfoSectionFunc func(err error)
}

type WriterProxy

type WriterProxy struct {
	io.Writer
}

func (WriterProxy) Write

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

Jump to

Keyboard shortcuts

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