Documentation
¶
Index ¶
- func NewLoggerBuilder() builder
- type FLogger
- type FLoggerImpl
- func (l *FLoggerImpl) Debug(args ...interface{})
- func (l *FLoggerImpl) Debugf(format string, args ...interface{})
- func (l *FLoggerImpl) Info(args ...interface{})
- func (l *FLoggerImpl) Infof(format string, args ...interface{})
- func (l *FLoggerImpl) SpinnerMessage(msg string)
- func (l *FLoggerImpl) StartSpinner(msg string) error
- func (l *FLoggerImpl) StopSpinner(err error) error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggerBuilder ¶
func NewLoggerBuilder() builder
Types ¶
type FLoggerImpl ¶
type FLoggerImpl struct {
// contains filtered or unexported fields
}
func (*FLoggerImpl) Debug ¶
func (l *FLoggerImpl) Debug(args ...interface{})
Example ¶
logger, _ := NewLoggerBuilder().Build() logger.Debug("test debug log with debug disabled")
Output:
Example (WithDebugEnabled) ¶
logger, _ := NewLoggerBuilder().WithDebug(true).Build() logger.Debug("test debug log with debug enabled")
Output: DEBUG: test debug log with debug enabled
func (*FLoggerImpl) Debugf ¶
func (l *FLoggerImpl) Debugf(format string, args ...interface{})
Example ¶
logger, _ := NewLoggerBuilder().Build() logger.Debugf("test debug log %s with debug disabled", "with format")
Output:
Example (WithDebugEnabled) ¶
logger, _ := NewLoggerBuilder().WithDebug(true).Build() logger.Debugf("test debug log %s with debug enabled", "with format")
Output: DEBUG: test debug log with format with debug enabled
func (*FLoggerImpl) Info ¶
func (l *FLoggerImpl) Info(args ...interface{})
Example ¶
logger, _ := NewLoggerBuilder().Build() logger.Info("test info log")
Output: test info log
func (*FLoggerImpl) Infof ¶
func (l *FLoggerImpl) Infof(format string, args ...interface{})
Example ¶
logger, _ := NewLoggerBuilder().Build() logger.Infof("test info log %s", "with format")
Output: test info log with format
func (*FLoggerImpl) SpinnerMessage ¶
func (l *FLoggerImpl) SpinnerMessage(msg string)
func (*FLoggerImpl) StartSpinner ¶
func (l *FLoggerImpl) StartSpinner(msg string) error
StartSpinner starts the spinner with the given message adding "\n" at the end.
func (*FLoggerImpl) StopSpinner ¶
func (l *FLoggerImpl) StopSpinner(err error) error
StopSpinner stops the spinner with success if err is nil, fail othewise.
Click to show internal directories.
Click to hide internal directories.