Documentation
¶
Index ¶
- Variables
- func Debug(a ...interface{})
- func Debugf(format string, a ...interface{})
- func Error(err error)
- func Errorf(format string, a ...interface{})
- func Fatal(err error)
- func Fatalf(format string, a ...interface{})
- func Info(a ...interface{})
- func Infof(format string, a ...interface{})
- func InitDefault(output io.Writer, config *types.Config)
- func Panic(err error)
- func Panicf(format string, a ...interface{})
- func Warn(a ...interface{})
- func Warnf(format string, a ...interface{})
- type ConsoleColorsType
- func (ConsoleColorsType) Blue() string
- func (ConsoleColorsType) Cyan() string
- func (ConsoleColorsType) Green() string
- func (ConsoleColorsType) Purple() string
- func (ConsoleColorsType) Red() string
- func (ConsoleColorsType) Reset() string
- func (ConsoleColorsType) White() string
- func (ConsoleColorsType) Yellow() string
- type Logger
- func (l *Logger) Debug(a ...interface{})
- func (l *Logger) Debugf(format string, a ...interface{})
- func (l *Logger) Error(err error)
- func (l *Logger) Errorf(format string, a ...interface{})
- func (l *Logger) Info(a ...interface{})
- func (l *Logger) Infof(format string, a ...interface{})
- func (l *Logger) Log(a ...interface{})
- func (l *Logger) Logf(format string, a ...interface{})
- func (l *Logger) SetDebug(value bool)
- func (l *Logger) SetError(value bool)
- func (l *Logger) SetInfo(value bool)
- func (l *Logger) SetWarn(value bool)
- func (l *Logger) Warn(a ...interface{})
- func (l *Logger) Warnf(format string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
var ( // ConsoleColors is a ConsoleColorsType singleton, which has a set of methods that return the color directive to change console color ConsoleColors = ConsoleColorsType{} )
Functions ¶
func Debugf ¶
func Debugf(format string, a ...interface{})
Debugf logs formatted debug-level message using default logger.
func Errorf ¶
func Errorf(format string, a ...interface{})
Errorf logs formatted error-level formatted string message using default logger.
func Fatal ¶
func Fatal(err error)
Fatal logs error-level message using default logger then calls os.Exit(1).
func Fatalf ¶
func Fatalf(format string, a ...interface{})
Fatalf logs formatted error-level formatted string message using default logger then calls os.Exit(1).
func Infof ¶
func Infof(format string, a ...interface{})
Infof logs formatted info-level message using default logger.
func InitDefault ¶
InitDefault creates default logger for package-level logging access.
func Panic ¶
func Panic(err error)
Panic logs error-level message using default logger then calls panic().
Types ¶
type ConsoleColorsType ¶
type ConsoleColorsType struct{}
ConsoleColorsType has a set of methods that return the color directive to change console color
func (ConsoleColorsType) Green ¶
func (ConsoleColorsType) Green() string
Green returns green directive
func (ConsoleColorsType) Purple ¶
func (ConsoleColorsType) Purple() string
Purple returns purple directive
func (ConsoleColorsType) Reset ¶
func (ConsoleColorsType) Reset() string
Reset returns original color directive
func (ConsoleColorsType) White ¶
func (ConsoleColorsType) White() string
White returns white directive
func (ConsoleColorsType) Yellow ¶
func (ConsoleColorsType) Yellow() string
Yellow returns yellow directive
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger filters and prints messages to a destination
func (*Logger) Debug ¶
func (l *Logger) Debug(a ...interface{})
Debug checks debug level is activated to write the message
func (*Logger) Info ¶
func (l *Logger) Info(a ...interface{})
Info checks info level is activated to write the message
func (*Logger) Log ¶
func (l *Logger) Log(a ...interface{})
Log writes message to the specified output