Documentation ¶
Index ¶
- type FileWriter
- type RotatingFileFn
- type RotatingFileWriter
- func (writer *RotatingFileWriter) Close() error
- func (writer *RotatingFileWriter) GC(inactiveDuration time.Duration)
- func (writer *RotatingFileWriter) GetOpenedFiles() []string
- func (writer *RotatingFileWriter) ReOpen() error
- func (writer *RotatingFileWriter) Write(le level.Level, module string, message string) error
- type StackMatchFn
- type StackWriter
- func (writer *StackWriter) Close() error
- func (writer *StackWriter) Push(w Writer, fn StackMatchFn)
- func (writer *StackWriter) PushWithLevels(w Writer, levels ...level.Level)
- func (writer *StackWriter) ReOpen() error
- func (writer *StackWriter) Write(le level.Level, module string, message string) error
- type StreamWriter
- type SyslogWriter
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
FileWriter is a LogWriter which write logs to file
func NewDefaultFileWriter ¶
func NewDefaultFileWriter(filename string) *FileWriter
NewDefaultFileWriter create new single file writer with default file mode and flags
func NewFileWriter ¶
func NewFileWriter(filename string, flag int, perm os.FileMode) *FileWriter
NewFileWriter create a FileWriter
func (*FileWriter) GetFileStat ¶
func (writer *FileWriter) GetFileStat() (os.FileInfo, error)
func (*FileWriter) GetFilename ¶
func (writer *FileWriter) GetFilename() string
type RotatingFileWriter ¶
type RotatingFileWriter struct {
// contains filtered or unexported fields
}
func NewDefaultRotatingFileWriter ¶
func NewDefaultRotatingFileWriter(ctx context.Context, fn RotatingFileFn) *RotatingFileWriter
func NewRotatingFileWriter ¶
func NewRotatingFileWriter(ctx context.Context, gcDuration time.Duration, flag int, perm os.FileMode, fn RotatingFileFn) *RotatingFileWriter
func (*RotatingFileWriter) Close ¶
func (writer *RotatingFileWriter) Close() error
func (*RotatingFileWriter) GC ¶
func (writer *RotatingFileWriter) GC(inactiveDuration time.Duration)
func (*RotatingFileWriter) GetOpenedFiles ¶
func (writer *RotatingFileWriter) GetOpenedFiles() []string
func (*RotatingFileWriter) ReOpen ¶
func (writer *RotatingFileWriter) ReOpen() error
type StackWriter ¶
type StackWriter struct {
// contains filtered or unexported fields
}
func (*StackWriter) Close ¶
func (writer *StackWriter) Close() error
func (*StackWriter) Push ¶
func (writer *StackWriter) Push(w Writer, fn StackMatchFn)
Push add a writer to stacks
func (*StackWriter) PushWithLevels ¶
func (writer *StackWriter) PushWithLevels(w Writer, levels ...level.Level)
PushWithLevels add a writer with only specified levels enabled if no levels specified, we will use all
func (*StackWriter) ReOpen ¶
func (writer *StackWriter) ReOpen() error
type StreamWriter ¶
type StreamWriter struct {
// contains filtered or unexported fields
}
func NewStdoutWriter ¶
func NewStdoutWriter() *StreamWriter
func NewStreamWriter ¶
func NewStreamWriter(w io.Writer) *StreamWriter
func (*StreamWriter) Close ¶
func (writer *StreamWriter) Close() error
func (*StreamWriter) ReOpen ¶
func (writer *StreamWriter) ReOpen() error
type SyslogWriter ¶
type SyslogWriter struct {
// contains filtered or unexported fields
}
SyslogWriter is a log writer for syslog
func NewSyslogWriter ¶
func NewSyslogWriter(network, raddr string, priority syslog.Priority, tag string) *SyslogWriter
NewSyslogWriter create a new SyslogWriter
func (*SyslogWriter) Close ¶
func (w *SyslogWriter) Close() error
func (*SyslogWriter) ReOpen ¶
func (w *SyslogWriter) ReOpen() error
Click to show internal directories.
Click to hide internal directories.