logrotate
logrotate copied to clipboard
Concurrency safe log rotating writer for Golang
There is currently no setting for deleting files. If there are too many files, is it better to set a parameter “MaximumFiles” to delete them?
Sample code, running on Microsoft Windows, which panics: ```go package main import ( "bufio" "fmt" "os" "path/filepath" "time" "github.com/easyCZ/logrotate" jww "github.com/spf13/jwalterweatherman" ) func main() { jww.SetLogThreshold(jww.LevelTrace) jww.SetStdoutThreshold(jww.LevelTrace) writer, err :=...
When FlushAfterEveryWrite is enabled, files are not rotated at max file size. This appears to be because the flush resets the bytes written counter on each flush. Pull Request #3...
Hi, In the current Write method, the input byte slice ref is directly added to the channel. Now, if the consumer reuses the byte slice, there is data overwrite. Copying...
bytesWritten counter is being reset, thus ignoring log rotation using the max file size parameter.