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

Get rid of JSON.parse #18

Open
jwalton opened this issue Jun 21, 2018 · 0 comments
Open

Get rid of JSON.parse #18

jwalton opened this issue Jun 21, 2018 · 0 comments

Comments

@jwalton
Copy link

jwalton commented Jun 21, 2018

If you do this:

var logger = bunyan.createLogger({
  name: "My Application",
  streams: [
    { stream: process.stdout },
    { stream: esStream, type: 'raw' }
  ],
  serializers: bunyan.stdSerializers
});

Then bunyan will send you raw JSON objects instead of sending you strings, so you won't have to call JSON.parse() on the log entry that Bunyan just JSON.stringified().

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

1 participant