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

feat: tolerate dirty json #431

Merged
merged 5 commits into from
Jan 2, 2024
Merged

Conversation

dprothero
Copy link
Contributor

When you use the aws logs tail command, it outputs non-JSON along with the JSON log entries. For example:

2024-01-01T19:52:19 {"level":20,"time":1704138739937,"pid":8,"hostname":"169.254.43.189","source":"search/src/lib/typesense.ts","msg":"found 20 records not in index"}

This change allows piping this type of output and having pjl still be able to parse the log entry. In theory, we could output the extraneous non-JSON data to stdout, but I don't personally need that, so I didn't implement it.

FYI, I use pino to output JSON log entries from an AWS Lambda function.

package.json Outdated Show resolved Hide resolved
@blacha blacha changed the title Tolerate dirty json (useful for aws logs tail) feat: tolerate dirty json Jan 1, 2024
@blacha
Copy link
Owner

blacha commented Jan 1, 2024

Looks like a really good improvement, thanks!

@blacha blacha merged commit 07db8f7 into blacha:master Jan 2, 2024
2 checks passed
blacha pushed a commit that referenced this pull request Jan 3, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.5.0](v1.4.1...v1.5.0)
(2024-01-02)


### Features

* tolerate dirty json
([#431](#431))
([07db8f7](07db8f7))


### Bug Fixes

* try checkout before release-please-action
([906c54e](906c54e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants