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 RegisterFileSystem(name string, fs FileSystem)
- type FileSystem
- type Level
- 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) SetQuite(quite 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 RegisterFileSystem ¶ added in v0.5.4
func RegisterFileSystem(name string, fs FileSystem)
Types ¶
type FileSystem ¶ added in v0.5.4
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.