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

Support 'structured logging' #48

Open
Download opened this issue Feb 15, 2021 · 0 comments
Open

Support 'structured logging' #48

Download opened this issue Feb 15, 2021 · 0 comments
Milestone

Comments

@Download
Copy link
Owner

Many logging frameworks support 'structured logging'.
Client code passes as first parameter an object to the log method, and the fields of this object are copied to the log record.

E.g.:

var log = anylogger('my:logger')
log.info({ some: 'field'}, 'Some message'}

In combination with a JSON output, this should give output something like this:

{ "level": "info", "name": "my:logger", "some": "field", "message": ["Some message"]}
@Download Download added this to the v2 milestone Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant