Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxSize = 100 DefaultMaxBackups = 7 DefaultAutoDirCreate = false )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RotateWriter ¶
type RotateWriter struct {
Filename string
MaxSize int
MaxBackups int
AutoDirCreate bool
// contains filtered or unexported fields
}
func New ¶
func New(ops ...WriterOption) (*RotateWriter, error)
func (*RotateWriter) Close ¶
func (w *RotateWriter) Close() error
type WriterOption ¶
type WriterOption func(*RotateWriter)
func AutoDirCreate ¶
func AutoDirCreate(auto bool) WriterOption
func Filename ¶
func Filename(name string) WriterOption
func MaxBackups ¶
func MaxBackups(num int) WriterOption
func MaxSize ¶
func MaxSize(size int) WriterOption
Click to show internal directories.
Click to hide internal directories.