Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMultiFileWriteFunc ¶
func NewMultiFileWriteFunc(writer *MultiFileWriter) func([]byte, fungolog.Level)
Types ¶
type AsyncFileWriter ¶
type AsyncFileWriter struct {
// contains filtered or unexported fields
}
func NewAsyncFileWriter ¶
func NewAsyncFileWriter(w Writer, bufSize int) *AsyncFileWriter
func (*AsyncFileWriter) Close ¶
func (this *AsyncFileWriter) Close() error
func (*AsyncFileWriter) Write ¶
func (this *AsyncFileWriter) Write(data []byte) error
type AsyncListFileWriter ¶
type AsyncListFileWriter struct {
// contains filtered or unexported fields
}
func NewAsyncListFileWriter ¶
func NewAsyncListFileWriter(w Writer) *AsyncListFileWriter
func (*AsyncListFileWriter) Close ¶
func (this *AsyncListFileWriter) Close() error
func (*AsyncListFileWriter) Write ¶
func (this *AsyncListFileWriter) Write(data []byte) error
type EmptyWriter ¶
type EmptyWriter struct {
}
func NewEmptyWriter ¶
func NewEmptyWriter() *EmptyWriter
func (*EmptyWriter) Close ¶
func (this *EmptyWriter) Close() error
func (*EmptyWriter) Write ¶
func (this *EmptyWriter) Write(data []byte) error
type FileNameGenerator ¶
type FileNameGenerator func() string
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
func NewFileWriter ¶
func NewFileWriter(fileName FileNameGenerator) *FileWriter
func (*FileWriter) Close ¶
func (this *FileWriter) Close() error
func (*FileWriter) Write ¶
func (this *FileWriter) Write(data []byte) (err error)
type MultiFileWriter ¶
type MultiFileWriter struct {
// contains filtered or unexported fields
}
多文件写入
func NewMultiFileWriter ¶
func NewMultiFileWriter(levels map[fungolog.Level]MultiFileWriterSetting, others MultiFileWriterSetting, all MultiFileWriterSetting) *MultiFileWriter
func (*MultiFileWriter) Close ¶
func (this *MultiFileWriter) Close() error
type MultiFileWriterSetting ¶
type MultiFileWriterSetting struct {
NameGenerator FileNameGenerator
Async bool // 是否异步写入
}
Click to show internal directories.
Click to hide internal directories.