Documentation ¶
Index ¶
Constants ¶
View Source
const (
RotateDaily = "2006-01-02"
)
RotateFormat
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
FileWriter create file log writer
type Option ¶
type Option func(opt *option)
Option filewriter option
func ChanSize ¶
ChanSize set internal chan size default 8192 use about 64k memory on x64 platform static, because filewriter has internal object pool, change chan size bigger may cause filewriter use a lot of memory, because sync.Pool can't set expire time memory won't free until program exit.
func MaxFile ¶
MaxFile default 999, 0 meaning unlimit. TODO: don't create file list if MaxSize is unlimt.
func RotateFormat ¶
RotateFormat e.g 2006-01-02 meaning rotate log file every day. NOTE: format can't contain ".", "." will cause panic ヽ(*。>Д<)o゜.
Click to show internal directories.
Click to hide internal directories.