Documentation
¶
Overview ¶
Package log implements a simple logging package.
package main
import (
"github.com/ije/gox/log"
)
func main() {
l, err := log.New("file:/var/log/error.log?buffer=32kb")
if err != nil {
return
}
l.Info("Hello World!")
}
Index ¶
- func RegisterLogWriter(name string, fs LogWriter)
- type Level
- type LogWriter
- 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) FlushBuffer() (err error)
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Print(v ...interface{})
- func (l *Logger) Printf(format string, v ...interface{})
- func (l *Logger) SetBuffer(cap int)
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) SetLevelByName(name string)
- func (l *Logger) SetOutput(output io.Writer)
- func (l *Logger) SetPrefix(prefix string)
- func (l *Logger) Term(term bool)
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterLogWriter ¶ added in v0.6.4
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) FlushBuffer ¶
func (*Logger) SetLevelByName ¶
Click to show internal directories.
Click to hide internal directories.