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

doctl apps logs doesn't output JSON #1536

Closed
ThisIsMissEm opened this issue May 29, 2024 · 0 comments · Fixed by #1593
Closed

doctl apps logs doesn't output JSON #1536

ThisIsMissEm opened this issue May 29, 2024 · 0 comments · Fixed by #1593
Labels
do-api Depends on additional features for the DigitalOcean API suggestion

Comments

@ThisIsMissEm
Copy link

What is the problem this feature would solve? Please describe.

On our apps services, we use JSON logging (pino) and it'd be really helpful to be able to do doctl apps logs <id> -f | pino-pretty but I can't because the log lines include the service name and the log timestamp, not just the log message:

webapp 2024-05-29T20:14:14.996999111Z {"level":30,"time":1717013654993,  ....

Describe the solution you'd like

I'd like to just get what I logged, i.e., the JSON, without the webapp 2024-05-29T20:14:14.996999111Z prefix.

Additional context

This would greatly improve my experience debugging apps on DO's App platform (currently we use papertrail, but it's not a particularly good log querier (doesn't parse the log lines correctly)

@andrewsomething andrewsomething added the do-api Depends on additional features for the DigitalOcean API label May 30, 2024
andrewsomething added a commit that referenced this issue Oct 21, 2024
* output formatting

* register flag

* Small fix

* Add integration test.

---------

Co-authored-by: Anna Lushnikova <[email protected]>
Co-authored-by: Andrew Starr-Bochicchio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-api Depends on additional features for the DigitalOcean API suggestion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants