Documentation ¶
Index ¶
- Variables
- func AddHook(hook Hook)
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Panic(v ...interface{})
- func Panicf(format string, v ...interface{})
- func SetLevel(l Level)
- func SetOutput(out WriteSyncer)
- func Sync() error
- func Trace(v ...interface{})
- func Tracef(format string, v ...interface{})
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
- type Entry
- type FileWriter
- type Hook
- type Hooks
- type Level
- type Logger
- func (logger *Logger) AddHook(hook Hook)
- func (logger *Logger) Debug(v ...interface{})
- func (logger *Logger) Debugf(format string, v ...interface{})
- func (logger *Logger) Enabled(level Level) bool
- func (logger *Logger) Error(v ...interface{})
- func (logger *Logger) Errorf(format string, v ...interface{})
- func (logger *Logger) Fatal(v ...interface{})
- func (logger *Logger) Fatalf(format string, v ...interface{})
- func (logger *Logger) GetLevel() Level
- func (logger *Logger) Info(v ...interface{})
- func (logger *Logger) Infof(format string, v ...interface{})
- func (logger *Logger) Panic(v ...interface{})
- func (logger *Logger) Panicf(format string, v ...interface{})
- func (logger *Logger) SetLevel(l Level)
- func (logger *Logger) SetOutput(out WriteSyncer)
- func (logger *Logger) Sync() error
- func (logger *Logger) Trace(v ...interface{})
- func (logger *Logger) Tracef(format string, v ...interface{})
- func (logger *Logger) Warning(v ...interface{})
- func (logger *Logger) Warningf(format string, v ...interface{})
- type WriteSyncer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("log: file writer already closed")
Functions ¶
func SetOutput ¶
func SetOutput(out WriteSyncer)
Types ¶
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
func NewFileWriter ¶
func NewFileWriter(path string, period time.Duration, maxRolls int) *FileWriter
maxRools: if <= 0, unlimited
func (*FileWriter) Close ¶
func (fw *FileWriter) Close() error
func (*FileWriter) Flush ¶
func (fw *FileWriter) Flush() error
func (*FileWriter) Sync ¶
func (fw *FileWriter) Sync() error
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) SetOutput ¶
func (logger *Logger) SetOutput(out WriteSyncer)
type WriteSyncer ¶
Click to show internal directories.
Click to hide internal directories.