Documentation
¶
Overview ¶
Yet Another Logger (yal) is a simple and lightweight colored and leveled logger. It's designed to be used as a singleton type logging solution that can be dropped into scripts and CLIs without complex dependency injection or configuration.
yal provides a top level singleton logger that is exposed to the user with the following levels Info, Debug, Warn, Error, Fatal.
Call methods ¶
yal.Info("Hello World")
yal.Infof("Hello World %s", "World")
Set Properties on Logger ¶
yal.Log.Colors = false
yal.Log.Level = yal.LevelWarn
Index ¶
- Variables
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- type LogLevel
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var Level = LogLevel(0)
View Source
var Log = Default()
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.