Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶
type FileWriter struct { log.LogFilter log.LogFormatter Path string // Log file path name DirPerm uint32 // Log dir permission FilePerm uint32 // Log file permission MaxSplit int // Max split files MaxSize int64 // Rotate at size MaxDays int // Max daily files MaxHours int // Max hourly files Gzip bool // Compress rotated log files SyncLevel log.Level // Call File.Sync() if level <= SyncLevel // contains filtered or unexported fields }
FileWriter implements Writer. It writes messages and rotate by file size limit, daily, hourly.
func (*FileWriter) Close ¶
func (fw *FileWriter) Close()
Close close the file description, close file writer.
func (*FileWriter) Flush ¶
func (fw *FileWriter) Flush()
Flush flush file logger. there are no buffering messages in file logger in memory. flush file means sync file to disk.
func (*FileWriter) SetMaxSize ¶
func (fw *FileWriter) SetMaxSize(maxSize string)
SetMaxSize set the MaxSize
func (*FileWriter) SetSyncLevel ¶
func (fw *FileWriter) SetSyncLevel(lvl string)
SetSyncLevel set the sync level
Click to show internal directories.
Click to hide internal directories.