Documentation
¶
Index ¶
- Constants
- func Flush()
- func SetLogLevel(pkg string, level LogLevel)
- func SetLogLevelGlobal(level LogLevel)
- func SetLoggers(level LogLevel, w io.Writer, ew io.Writer)
- type LogLevel
- type Logger
- func (l *Logger) Debugf(s string, args ...interface{})
- func (l *Logger) Debugln(s ...interface{})
- func (l *Logger) Errorf(s string, args ...interface{})
- func (l *Logger) Errorln(s ...interface{})
- func (l *Logger) Infof(s string, args ...interface{})
- func (l *Logger) Infoln(s ...interface{})
- func (l *Logger) Printf(s string, args ...interface{})
- func (l *Logger) Println(s ...interface{})
- func (l *Logger) Warnf(s string, args ...interface{})
- func (l *Logger) Warnln(s ...interface{})
- type SafeWriter
Constants ¶
View Source
const (
Version = "0.1.0" // add LogLevel type and Warn level
)
Variables ¶
This section is empty.
Functions ¶
func SetLogLevelGlobal ¶
func SetLogLevelGlobal(level LogLevel)
Types ¶
type Logger ¶
type Logger struct { Level LogLevel Pkg string // these are here for easy access // for functions that want the writer Writer *SafeWriter ErrWriter *SafeWriter }
type SafeWriter ¶
type SafeWriter struct {
// contains filtered or unexported fields
}
func NewSafeWriter ¶
func NewSafeWriter(ch chan []byte) *SafeWriter
Click to show internal directories.
Click to hide internal directories.