Documentation ¶
Overview ¶
Package logrus provides a logger implementation using the logrus library
Index ¶
- type Logger
- type SectionLogger
- func (l *SectionLogger) ExecuteStep(title string, fn func() error) error
- func (l *SectionLogger) PrefixText(txt string) string
- func (l *SectionLogger) ProgressBar() log.ProgressBar
- func (l *SectionLogger) Section(title string, fn func(log.SectionLogger) error) error
- func (l *SectionLogger) StartSection(string) log.SectionLogger
- func (l *SectionLogger) Successf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger defines a Logger implemented by logrus
type SectionLogger ¶
type SectionLogger struct {
*Logger
}
SectionLogger defines a SectionLogger implemented by logrus
func NewSectionLogger ¶
func NewSectionLogger() *SectionLogger
NewSectionLogger returns a new SectionLogger implemented by logrus
func (*SectionLogger) ExecuteStep ¶
func (l *SectionLogger) ExecuteStep(title string, fn func() error) error
ExecuteStep executes a function while showing an indeterminate progress animation
func (*SectionLogger) PrefixText ¶
func (l *SectionLogger) PrefixText(txt string) string
PrefixText returns the indented version of the provided text
func (*SectionLogger) ProgressBar ¶
func (l *SectionLogger) ProgressBar() log.ProgressBar
ProgressBar returns a new silent progress bar
func (*SectionLogger) Section ¶
func (l *SectionLogger) Section(title string, fn func(log.SectionLogger) error) error
Section executes the provided function inside a new section
func (*SectionLogger) StartSection ¶
func (l *SectionLogger) StartSection(string) log.SectionLogger
StartSection starts a new log section
func (*SectionLogger) Successf ¶
func (l *SectionLogger) Successf(format string, args ...interface{})
Successf logs a new success message (more efusive than Infof)
Click to show internal directories.
Click to hide internal directories.