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
[WIP] Plain ndjson #58
Conversation
PS: PRs to this branch are welcome if you see something you want to tackle. |
Pull Request Test Coverage Report for Build 135
💛 - Coveralls |
Pull Request Test Coverage Report for Build 194
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, I think you can go ahead and drop node 6 as well.
I intend to. |
FYI: stack formatting is a nightmare. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* test coverage for filtering out with search * obsolete check, ignored keys already filtered * basic tests for prettifyErrorLog & prettifyObject
I think this is as done as I have time for. It would be nice to get a robust set of sample data to feed through it to at least generate a screenshot for the readme, but that can be a "good first issue" or I will come back to it later. We might as well wait for Node 12 to be released before closing this out since it is so close and this PR drops Node 6. In the meantime, if anyone can think of how to cover https://coveralls.io/builds/22789235/source?filename=bin.js#L45 in the tests, a PR is welcome. The only other block Coveralls thinks is not covered is most definitely covered as I have stepped through it via the test suite. It would also be fantastic if someone with more patience and time for formatting would come through and make the output even prettier. But it's good enough as-is. |
This PR will refactor
pino-pretty
to be a generic ndjson prettifier. It will recognize various properties that are common in ndjson log lines, and handle those properties in a sane way, but it will no longer skip JSON lines it does not recognize. Instead, it will apply a basic format to them.TODO:
Figure out what format bog standard JSON lines should be presented in(I do not have time for this)For the formatting of standard JSON lines I'm thinking:
=>
and
=>
Opinions @pinojs/core?