Documentation ¶
Overview ¶
Package logger is a general-use CLI tool logger
Index ¶
- Variables
- type Interface
- type Logger
- func (l *Logger) Error(message string, args ...interface{})
- func (l *Logger) Errors(messages []string, args ...interface{})
- func (l *Logger) Focused(message string, args ...interface{})
- func (l *Logger) Info(message string, args ...interface{})
- func (l *Logger) InfoPart(message string, args ...interface{})
- func (l *Logger) ListItem(message string, args ...interface{})
- func (l *Logger) Log(message string, style *color.Color, args ...interface{})
- func (l *Logger) LogPart(message string, style *color.Color, args ...interface{})
- func (l *Logger) SpinnerStart(message string)
- func (l *Logger) SpinnerStop()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StyleError represents the log item style for an error StyleError = color.New(color.FgHiRed, color.Bold) // StyleFocused represents a log item that should be able to picked out of the mix StyleFocused = color.New(color.Bold) // StyleInfo is style for an info, or normal, message StyleInfo = color.New() )
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Focused(message string, args ...interface{}) Error(message string, args ...interface{}) Errors(messages []string, args ...interface{}) Info(message string, args ...interface{}) InfoPart(message string, args ...interface{}) ListItem(message string, args ...interface{}) LogPart(message string, style *color.Color, args ...interface{}) Log(message string, style *color.Color, args ...interface{}) SpinnerStart(message string) SpinnerStop() }
Interface is an interface for a cli logger
type Logger ¶
type Logger struct{}
Logger is the default logger for vshasta
func (*Logger) InfoPart ¶
InfoPart will log part of line, without breaking so that other log items can still be appended to the line
func (*Logger) LogPart ¶
LogPart will log part of line, without breaking so that other log items can still be appended to the line
func (*Logger) SpinnerStart ¶
SpinnerStart will start a spinner/waiting message that will go until we stop it
Click to show internal directories.
Click to hide internal directories.