Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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