Registry / logging / x-cray-logrus-prefixed-formatter

x-cray-logrus-prefixed-formatter

JSON →
library0.5.2gogounverified

A text formatter for the Logrus logging library that adds customizable prefixes to log entries.

go get github.com/x-cray/logrus-prefixed-formatter
INSTALL
IMPORT
SIG · X-CRAY-LOGRUS-PREF
X
x-cray-logrus-prefixed-formatter
logginggov0.5.2
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.

prefixed
github.com/x-cray/logrus-prefixed-formatter

Configures Logrus to use the prefixed text formatter with colors enabled.

package main import ( "github.com/sirupsen/logrus" prefixed "github.com/x-cray/logrus-prefixed-formatter" ) func main() { logrus.SetFormatter(&prefixed.TextFormatter{ ForceColors: true, }) logrus.WithField("module", "main").Info("Hello with prefix") }
Debug
Known issues
gotchaThis package is no longer actively maintained; consider using logrus's built-in TextFormatter or other maintained formatters.
fix
Switch to github.com/sirupsen/logrus's default TextFormatter or use a maintained alternative like github.com/antonfisher/nested-logrus-formatter.
affects: >=0.5.0
Upgrade
Version history
0.5.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
Resources
x-cray-logrus-prefixed-formatter — go get x-cray-logrus-prefixed-formatter · libregistry