Documentation ¶
Index ¶
- Constants
- func ContentWidth() int
- func DisableFitMode()
- func DisableLogColor()
- func DisablePrettyLog()
- func EnableFitMode()
- func EnableLogColor()
- func ErrF(format string, a ...interface{}) (int, error)
- func FitText(text string, options FitTextOptions) string
- func GetErrStream() io.Writer
- func GetOutStream() io.Writer
- func GetRawStreamsOutputMode() bool
- func IndentDown()
- func IndentUp()
- func Init() error
- func LogBlock(blockMessage string, options LogBlockOptions, blockFunc func() error) error
- func LogErrorF(format string, a ...interface{})
- func LogErrorLn(a ...interface{})
- func LogF(format string, a ...interface{})
- func LogFWithOptions(options LogFOptions, format string, a ...interface{})
- func LogInfoF(format string, a ...interface{})
- func LogInfoLn(a ...interface{})
- func LogLn(a ...interface{})
- func LogLnWithOptions(options LogLnOptions, a ...interface{})
- func LogOptionalLn()
- func LogProcess(processMessage string, options LogProcessOptions, processFunc func() error) error
- func LogProcessEnd(options LogProcessEndOptions)
- func LogProcessFail(options LogProcessFailOptions)
- func LogProcessInline(processMessage string, options LogProcessInlineOptions, ...) error
- func LogProcessStart(processMessage string, options LogProcessStartOptions)
- func LogProcessStepEnd(processMessage string, options LogProcessStepEndOptions)
- func LogWarnF(format string, a ...interface{})
- func LogWarnLn(a ...interface{})
- func MuteErr()
- func MuteOut()
- func OutF(format string, a ...interface{}) (int, error)
- func RawStreamsOutputModeOff()
- func RawStreamsOutputModeOn()
- func ResetPrefix()
- func SetLevel(l Level)
- func SetPrefix(value string, style *Style)
- func SetQuietLevel()
- func SetRunningTimePrefix(style *Style)
- func SetStreamsLogLevel(logLevel Level)
- func SetStyle(name string, style *Style)
- func SetTag(value string, style *Style)
- func SetWidth(value int)
- func UnmuteErr()
- func UnmuteOut()
- func WithFitMode(value bool, decoratedFunc func() error) error
- func WithIndent(f func() error) error
- func WithLevel(level Level, f func())
- func WithRawStreamsOutputModeOn(f func() error) error
- func WithStreamsLogLevel(logLevel Level, f func() error) error
- func WithTag(value string, style *Style, f func() error) error
- func WithoutIndent(decoratedFunc func() error) error
- type FitTextOptions
- type Level
- func (l Level) IsAccepted() bool
- func (l Level) LogBlock(blockMessage string, options LevelLogBlockOptions, processFunc func() error) error
- func (l Level) LogF(format string, a ...interface{})
- func (l Level) LogFDetails(format string, a ...interface{})
- func (l Level) LogFHighlight(format string, a ...interface{})
- func (l Level) LogFWithCustomStyle(style *Style, format string, a ...interface{})
- func (l Level) LogLn(a ...interface{})
- func (l Level) LogLnDetails(a ...interface{})
- func (l Level) LogLnHighlight(a ...interface{})
- func (l Level) LogLnWithCustomStyle(style *Style, a ...interface{})
- func (l Level) LogOptionalLn()
- func (l Level) LogProcess(processMessage string, options LevelLogProcessOptions, ...) error
- func (l Level) LogProcessEnd(options LevelLogProcessEndOptions)
- func (l Level) LogProcessFail(options LevelLogProcessFailOptions)
- func (l Level) LogProcessInline(processMessage string, options LevelLogProcessInlineOptions, ...) error
- func (l Level) LogProcessStart(processMessage string, options LevelLogProcessStartOptions)
- func (l Level) LogProcessStepEnd(processMessage string, options LevelLogProcessStepEndOptions)
- func (l Level) ResetStream()
- func (l Level) SetStream(stream io.Writer)
- func (l Level) SetStyle(style *Style)
- func (l Level) Stream() io.Writer
- func (l Level) String() string
- func (l Level) Style() *Style
- type LevelLogBlockOptions
- type LevelLogProcessEndOptions
- type LevelLogProcessFailOptions
- type LevelLogProcessInlineOptions
- type LevelLogProcessOptions
- type LevelLogProcessStartOptions
- type LevelLogProcessStepEndOptions
- type LogBlockOptions
- type LogFOptions
- type LogLnOptions
- type LogOptions
- type LogProcessEndOptions
- type LogProcessFailOptions
- type LogProcessInlineOptions
- type LogProcessOptions
- type LogProcessStartOptions
- type LogProcessStepEndOptions
- type Style
- type WriterProxy
Constants ¶
View Source
const ( HighlightStyleName = "highlight" DetailsStyleName = "details" FailStyleName = "fail" )
View Source
const DefaultWidth = 140
Variables ¶
This section is empty.
Functions ¶
func ContentWidth ¶
func ContentWidth() int
func DisableFitMode ¶ added in v0.2.3
func DisableFitMode()
func DisableLogColor ¶
func DisableLogColor()
func DisablePrettyLog ¶
func DisablePrettyLog()
func EnableFitMode ¶ added in v0.2.3
func EnableFitMode()
func EnableLogColor ¶
func EnableLogColor()
func FitText ¶
func FitText(text string, options FitTextOptions) string
func GetErrStream ¶
func GetOutStream ¶
func GetRawStreamsOutputMode ¶
func GetRawStreamsOutputMode() bool
func IndentDown ¶
func IndentDown()
func LogBlock ¶ added in v0.1.1
func LogBlock(blockMessage string, options LogBlockOptions, blockFunc func() error) error
func LogErrorLn ¶
func LogErrorLn(a ...interface{})
func LogFWithOptions ¶ added in v0.3.1
func LogFWithOptions(options LogFOptions, format string, a ...interface{})
func LogLnWithOptions ¶ added in v0.3.1
func LogLnWithOptions(options LogLnOptions, 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 LogProcessFailOptions)
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 RawStreamsOutputModeOff ¶
func RawStreamsOutputModeOff()
func RawStreamsOutputModeOn ¶
func RawStreamsOutputModeOn()
func ResetPrefix ¶ added in v0.2.4
func ResetPrefix()
func SetQuietLevel ¶ added in v0.3.1
func SetQuietLevel()
func SetRunningTimePrefix ¶ added in v0.3.2
func SetRunningTimePrefix(style *Style)
func SetStreamsLogLevel ¶ added in v0.3.1
func SetStreamsLogLevel(logLevel Level)
func WithFitMode ¶ added in v0.2.3
func WithIndent ¶
func WithStreamsLogLevel ¶ added in v0.3.1
func WithoutIndent ¶
Types ¶
type FitTextOptions ¶
type Level ¶ added in v0.3.1
type Level int
const ( Error Level Warn Default // 0 Info Debug )
func (Level) IsAccepted ¶ added in v0.3.1
func (Level) LogBlock ¶ added in v0.3.1
func (l Level) LogBlock(blockMessage string, options LevelLogBlockOptions, processFunc func() error) error
func (Level) LogFDetails ¶ added in v0.3.1
func (Level) LogFHighlight ¶ added in v0.3.1
func (Level) LogFWithCustomStyle ¶ added in v0.3.1
func (Level) LogLnDetails ¶ added in v0.3.1
func (l Level) LogLnDetails(a ...interface{})
func (Level) LogLnHighlight ¶ added in v0.3.1
func (l Level) LogLnHighlight(a ...interface{})
func (Level) LogLnWithCustomStyle ¶ added in v0.3.1
func (Level) LogOptionalLn ¶ added in v0.3.2
func (l Level) LogOptionalLn()
func (Level) LogProcess ¶ added in v0.3.1
func (l Level) LogProcess(processMessage string, options LevelLogProcessOptions, processFunc func() error) error
func (Level) LogProcessEnd ¶ added in v0.3.1
func (l Level) LogProcessEnd(options LevelLogProcessEndOptions)
func (Level) LogProcessFail ¶ added in v0.3.1
func (l Level) LogProcessFail(options LevelLogProcessFailOptions)
func (Level) LogProcessInline ¶ added in v0.3.1
func (l Level) LogProcessInline(processMessage string, options LevelLogProcessInlineOptions, processFunc func() error) error
func (Level) LogProcessStart ¶ added in v0.3.1
func (l Level) LogProcessStart(processMessage string, options LevelLogProcessStartOptions)
func (Level) LogProcessStepEnd ¶ added in v0.3.1
func (l Level) LogProcessStepEnd(processMessage string, options LevelLogProcessStepEndOptions)
func (Level) ResetStream ¶ added in v0.3.1
func (l Level) ResetStream()
type LevelLogBlockOptions ¶ added in v0.3.1
type LevelLogProcessEndOptions ¶ added in v0.3.1
type LevelLogProcessFailOptions ¶ added in v0.3.1
type LevelLogProcessFailOptions struct {
LevelLogProcessEndOptions
}
type LevelLogProcessInlineOptions ¶ added in v0.3.1
type LevelLogProcessInlineOptions struct {
Style *Style
}
type LevelLogProcessOptions ¶ added in v0.3.1
type LevelLogProcessStartOptions ¶ added in v0.3.1
type LevelLogProcessStartOptions struct {
Style *Style
}
type LevelLogProcessStepEndOptions ¶ added in v0.3.1
type LogBlockOptions ¶ added in v0.1.1
type LogBlockOptions struct { LevelLogBlockOptions Level Level }
type LogFOptions ¶ added in v0.3.1
type LogFOptions struct {
LogOptions
}
type LogLnOptions ¶ added in v0.3.1
type LogLnOptions struct {
LogOptions
}
type LogOptions ¶ added in v0.3.1
type LogProcessEndOptions ¶
type LogProcessEndOptions struct { LevelLogProcessEndOptions Level Level }
type LogProcessFailOptions ¶ added in v0.3.1
type LogProcessFailOptions struct { LevelLogProcessFailOptions Level Level }
type LogProcessInlineOptions ¶
type LogProcessInlineOptions struct { LevelLogProcessInlineOptions Level Level }
type LogProcessOptions ¶
type LogProcessOptions struct { LevelLogProcessOptions Level Level }
type LogProcessStartOptions ¶
type LogProcessStartOptions struct { LevelLogProcessStartOptions Level Level }
type LogProcessStepEndOptions ¶
type LogProcessStepEndOptions struct { LevelLogProcessStepEndOptions Level Level }
type Style ¶ added in v0.3.1
func DetailsStyle ¶ added in v0.3.1
func DetailsStyle() *Style
func HighlightStyle ¶ added in v0.3.1
func HighlightStyle() *Style
func StyleByName ¶ added in v0.3.1
type WriterProxy ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.