Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is this package needed? #2

Closed
martint17r opened this issue Apr 21, 2017 · 2 comments
Closed

Why is this package needed? #2

martint17r opened this issue Apr 21, 2017 · 2 comments

Comments

@martint17r
Copy link

I am not sure how your code makes a difference against using the standard JSONFormatter like this:

logrus.SetFormatter(&log.JSONFormatter{
    FieldMap: logrus.FieldMap{
        logrus.FieldKeyTime:  "time",
        logrus.FieldKeyLevel: "severity",
        logrus.FieldKeyMsg:   "message",
    },
})

Could you please elaborate?

@balboah
Copy link
Member

balboah commented Apr 21, 2017

I was not aware of the FieldMap option, it's probably enough to use that. Thank you for providing an example

@MrWako
Copy link

MrWako commented Feb 29, 2020

... just to add that it also maps the logrus severity levels to the fluentd severity levels.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants