Documentation ¶
Index ¶
- Variables
- type ConsoleOutput
- type Entry
- type FileOutput
- type ILogger
- type Level
- type Logger
- func (l *Logger) Debug(message string)
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(message string)
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(message string)
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Info(message string)
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Trace(message string)
- func (l *Logger) Tracef(format string, args ...interface{})
- func (l *Logger) Warn(message string)
- func (l *Logger) Warnf(format string, args ...interface{})
- type Output
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = [...]*color.Color{ TraceILevel: color.New(color.FgWhite), DebugLevel: color.New(color.FgWhite), InfoLevel: color.New(color.FgBlue), WarnLevel: color.New(color.FgYellow), ErrorLevel: color.New(color.FgRed), FatalLevel: color.New(color.FgRed), }
View Source
var Strings = [...]string{
TraceILevel: "•",
DebugLevel: "•",
InfoLevel: "•",
WarnLevel: "•",
ErrorLevel: "⨯",
FatalLevel: "⨯",
}
Functions ¶
This section is empty.
Types ¶
type ConsoleOutput ¶
This is a struct for a console output type
func NewConsoleOutput ¶
func NewConsoleOutput(w io.Writer) *ConsoleOutput
func (*ConsoleOutput) Write ¶
func (c *ConsoleOutput) Write(entry *Entry) error
type FileOutput ¶
type FileOutput struct {
// contains filtered or unexported fields
}
func (FileOutput) Write ¶
func (f FileOutput) Write(entry *Entry) error
type ILogger ¶
type ILogger interface { Trace(message string) Tracef(format string, args ...interface{}) Debug(message string) Debugf(format string, args ...interface{}) Info(message string) Infof(format string, args ...interface{}) Warn(message string) Warnf(format string, args ...interface{}) Error(message string) Errorf(format string, args ...interface{}) Fatal(message string) Fatalf(format string, args ...interface{}) }
type Level ¶
type Level int32
const ( // TraceILevel is for logging very low-level library information TraceILevel Level = iota // Debug is for logging low-level library information DebugLevel // InfoLevel is for logging normal library operation InfoLevel // WarnLevel is for logging potential errors library operation WarnLevel // ErrorLevel is for logging abnormal, but non-fatal library operation ErrorLevel // FatalLevel is for fatal errors. FatalLevel )
Click to show internal directories.
Click to hide internal directories.