Documentation
¶
Index ¶
- func Debug(format string, args ...interface{})
- func Error(format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func Info(format string, args ...interface{})
- func SetLevel(level Priority)
- func SetWriter(writer io.Writer)
- func Warn(format string, args ...interface{})
- type Log
- func (l *Log) Debug(format string, args ...interface{})
- func (l *Log) Error(format string, args ...interface{})
- func (l *Log) Fatal(format string, args ...interface{})
- func (l *Log) Info(format string, args ...interface{})
- func (l *Log) Warn(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 Debug ¶
func Debug(format string, args ...interface{})
Debug writes formatted message to l.writer.
func Error ¶
func Error(format string, args ...interface{})
Error writes formatted error to l.writer.
func Fatal ¶
func Fatal(format string, args ...interface{})
Fatal is equivalent to Error and os.Exit(1).
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) WithPrefix ¶
WithPrefix returns a new logger instance with the specified prefix.
Directories
¶
Path | Synopsis |
---|---|
example
|
|
basic
command
|
|
concurrent
command
This example demonstates that the log-go package is thread-safe.
|
This example demonstates that the log-go package is thread-safe. |
Click to show internal directories.
Click to hide internal directories.