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

JSON Logging #221

Open
felixguendling opened this issue Mar 8, 2022 · 4 comments
Open

JSON Logging #221

felixguendling opened this issue Mar 8, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@felixguendling
Copy link
Member

Example:

{
    "time": "2022-03-08T09:32:20.685+00:00",
    "severity": "WARN",
    "logger": "dispatcher.cc:121",
    "msg": "target not found: /metrics"
}
@felixguendling felixguendling added the enhancement New feature or request label Mar 8, 2022
@derhuerst
Copy link

It would be great if the format would follow one of the (many) conventions out there, including the question how to deal with additional fields.

@felixguendling
Copy link
Member Author

felixguendling commented Mar 8, 2022

I can't find something like a real standard / RFC on JSON logging. Which format would you prefer?
There's a lot of content about JSON logging out there but everybody seems to name fields in a different way, have different formats for timestamps, etc.

I think this looks good to me: https://nodejs.org/en/blog/module/service-logging-in-json-with-bunyan/

@derhuerst
Copy link

I can't find something like a real standard / RFC on JSON logging.

Yeah, me too. Nothing fully established.

Which format would you prefer?

I like to use pino in the Node.js world, which logs in a format very similar to the well-known bunyan.

I also found the Google Cloud schema.

@felixguendling
Copy link
Member Author

Makes sense. Being compatible to bunyan and/or pino would have the benefit of being able to use their pretty-print tools. Sounds great! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants