Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func SetLevel(level Priority)
- func SetWriter(writer io.Writer)
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- type Log
- func (l *Log) Debug(args ...interface{})
- func (l *Log) Debugf(format string, args ...interface{})
- func (l *Log) Error(args ...interface{})
- func (l *Log) Errorf(format string, args ...interface{})
- func (l *Log) Fatal(args ...interface{})
- func (l *Log) Fatalf(format string, args ...interface{})
- func (l *Log) Info(args ...interface{})
- func (l *Log) Infof(format string, args ...interface{})
- func (l *Log) Panic(args ...interface{})
- func (l *Log) Panicf(format string, args ...interface{})
- func (l *Log) Warn(args ...interface{})
- func (l *Log) Warnf(format string, args ...interface{})
- func (l *Log) WithLevel(level Priority) Log
- func (l *Log) WithPrefix(prefix string) Log
- func (l *Log) WithWriter(writer io.Writer) Log
- type Priority
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶ added in v0.4.0
func Debugf(format string, args ...interface{})
Debugf writes formatted message to l.writer.
func Errorf ¶ added in v0.4.0
func Errorf(format string, args ...interface{})
Errorf writes formatted error to l.writer.
func Fatalf ¶ added in v0.4.0
func Fatalf(format string, args ...interface{})
Fatalf is equivalent to Error and os.Exit(1).
func Infof ¶ added in v0.4.0
func Infof(format string, args ...interface{})
Infof writes formatted message to l.writer.
func Panic ¶ added in v0.3.0
func Panic(args ...interface{})
Panic is equivalent to panic(formattedMessage).
Types ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log is the central logger struct.
func Default ¶
func Default() Log
Default returns a default logger instance used withing this package and available globally.
func (*Log) Debug ¶
func (l *Log) Debug(args ...interface{})
Debug writes formatted debug message to l.writer.
func (*Log) Error ¶
func (l *Log) Error(args ...interface{})
Error writes formatted error to l.writer.
func (*Log) Fatal ¶
func (l *Log) Fatal(args ...interface{})
Fatal is equivalent to Error and os.Exit(1).
func (*Log) Info ¶
func (l *Log) Info(args ...interface{})
Info writes formatted info message to l.writer.
func (*Log) Panic ¶ added in v0.3.0
func (l *Log) Panic(args ...interface{})
Panic is equivalent to panic(formattedMessage).
func (*Log) Warn ¶
func (l *Log) Warn(args ...interface{})
Warn writes formatted warning to l.writer.
func (*Log) WithPrefix ¶
WithPrefix returns a new logger instance with the specified prefix.
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
colors
This example shows you all colours of the rainbow! :)
|
This example shows you all colours of the rainbow! :) |
concurrent
This example demonstates that the log-go package is thread-safe.
|
This example demonstates that the log-go package is thread-safe. |