Registry / logging / natefinch-lumberjack

natefinch-lumberjack

JSON →
library2.0.0+incompatiblegogounverified

Package lumberjack provides a rolling logger.

go get github.com/natefinch/lumberjack
INSTALL
IMPORT
SIG · NATEFINCH-LUMBERJA
N
natefinch-lumberjack
logginggov2.0.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.

lumberjack
github.com/natefinch/lumberjack

Configure a rolling file logger

package main import ( "log" "github.com/natefinch/lumberjack" ) func main() { logger := &lumberjack.Logger{ Filename: "/var/log/myapp.log", MaxSize: 500, // megabytes MaxBackups: 3, MaxAge: 28, // days } log.SetOutput(logger) log.Println("Hello, Lumberjack!") }
Debug
Known issues
gotchaLumberjack does not support concurrent writes from multiple processes; use with caution in multi-process environments.
fix
Ensure only one process writes to the same log file, or use a different logging solution.
affects: all
Upgrade
Version history
2.0.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
natefinch-lumberjack — go get natefinch-lumberjack · libregistry