Registry / logging / nytimes-logrotate

nytimes-logrotate

JSON →
library1.0.0gogounverified

Package logrotate provides a file writer that automatically rotates log files based on size.

go get github.com/NYTimes/logrotate
INSTALL
IMPORT
SIG · NYTIMES-LOGROTATE
N
nytimes-logrotate
logginggov1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

logrotate
github.com/NYTimes/logrotate

Creates a log file writer that rotates at 10 MB and sets it as the default logger output.

package main import ( "log" "github.com/NYTimes/logrotate" ) func main() { w, _ := logrotate.NewFileWriter("app.log", logrotate.WithMaxSize(10*1024*1024)) defer w.Close() log.SetOutput(w) log.Println("Log entry") }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
30
Amazon
1
OpenAI (training)
1
Resources
nytimes-logrotate — go get nytimes-logrotate · libregistry