8000 Why is this package needed? · Issue #2 · joonix/log · GitHub
[go: up one dir, main page]

Skip to content

Why is this package needed? #2

Closed

Description

@martint17r

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?

Activity

  1. balboah commented on Apr 21, 2017

    @balboah
    Member

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

  2. MrWako commented on Feb 29, 2020

    @MrWako

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0