Registry / logging / rifflock-lfshook

rifflock-lfshook

JSON →
library0.0.0-20180920164130-b9218ef580f5gogounverified

Package lfshook is hook for sirupsen/logrus that used for writing the logs to local files.

go get github.com/rifflock/lfshook
INSTALL
IMPORT
SIG · RIFFLOCK-LFSHOOK
R
rifflock-lfshook
logginggov0.0.0-20180920164130-b9218ef580f5
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.

lfshook
✓ github.com/rifflock/lfshook

Add a hook to logrus that writes log entries to separate files per level.

package main import ( "github.com/rifflock/lfshook" "github.com/sirupsen/logrus" ) func main() { logrus.AddHook(lfshook.NewHook(lfshook.PathMap{ logrus.InfoLevel: "/var/log/info.log", logrus.ErrorLevel: "/var/log/error.log", })) logrus.Info("this goes to info.log") }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20180920164130-b9218ef580f5latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
34 hits · last 30 days
node
32
Resources
rifflock-lfshook — go get rifflock-lfshook · libregistry