Registry / logging / lestrrat-go-file-rotatelogs

lestrrat-go-file-rotatelogs

JSON →
library2.4.0+incompatiblegogounverified

Package rotatelogs is a port of File-RotateLogs from Perl, allowing automatic rotation of output files based on a filename pattern.

go get github.com/lestrrat-go/file-rotatelogs
INSTALL
IMPORT
SIG · LESTRRAT-GO-FILE-R
L
lestrrat-go-file-rotatelogs
logginggov2.4.0+incompatible
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.

rotatelogs
github.com/lestrrat-go/file-rotatelogs

Creates a rotating log writer and sets it as the log output.

package main import ( "io" "log" "time" "github.com/lestrrat-go/file-rotatelogs" ) func main() { writer, _ := rotatelogs.New("access_log.%Y%m%d%H%M") log.SetOutput(io.MultiWriter(writer, os.Stdout)) log.Println("Hello, World!") }
Debug
Known issues
gotchaVersion 2.4.0+incompatible indicates it uses Go modules but may have breaking changes from earlier versions.
fix
Check the release notes for breaking changes when upgrading from v1.
affects: >=2.0.0
Upgrade
Version history
2.4.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
Resources
lestrrat-go-file-rotatelogs — go get lestrrat-go-file-rotatelogs · libregistry