github.com/Aoi-hosizora/ahlib-more@v1.5.1-0.20230404072844-256112befaf6/xrotation/README.md (about) 1 # xrotation 2 3 ## Dependencies 4 5 + github.com/Aoi-hosizora/ahlib 6 7 ## Documents 8 9 ### Types 10 11 + `type Option func` 12 + `type RotationLogger struct` 13 14 ### Variables 15 16 + None 17 18 ### Constants 19 20 + None 21 22 ### Functions 23 24 + `func WithSymlinkFilename(f string) Option` 25 + `func WithClock(c xtime.Clock) Option` 26 + `func WithForceNewFile(b bool) Option` 27 + `func WithRotationTime(t time.Duration) Option` 28 + `func WithRotationSize(size int64) Option` 29 + `func WithRotationMaxAge(age time.Duration) Option` 30 + `func WithRotationMaxCount(count int32) Option` 31 + `func New(pattern string, options ...Option) (*RotationLogger, error)` 32 33 ### Methods 34 35 + `func (r *RotationLogger) Write(p []byte) (n int, err error)` 36 + `func (r *RotationLogger) Rotate() error` 37 + `func (r *RotationLogger) CurrentFilename() string` 38 + `func (r *RotationLogger) Close() error`