Created
July 6, 2021 13:36
-
-
Save garystafford/ae12d86247b128e6b6fd58ccb602500e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func init() { | |
childFormatter := logrus.JSONFormatter{} | |
runtimeFormatter := &lrf.Formatter{ChildFormatter: &childFormatter} | |
runtimeFormatter.Line = true | |
log.Formatter = runtimeFormatter | |
log.Out = os.Stdout | |
level, err := logrus.ParseLevel(logLevel) | |
if err != nil { | |
log.Error(err) | |
} | |
log.Level = level | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment