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

Development: Persist structured logs about unexpected errors #248

Merged
merged 14 commits into from
Jul 26, 2022

Conversation

priitlatt
Copy link
Contributor

@priitlatt priitlatt commented Jul 21, 2022

At the moment information about failed HTTP requests and stacktraces of unexpected exceptions on failed command line action invocations are only logged into the main logfile. This file also contains a lot of unrelated information, which can be seen as unimportant noise for anyone not directly related to this package. As such it is difficult for package clients to find out the actual root cause of the failure.

In order to make it easier to include relevant information with bug reports, log error and failure information also separately in a JSON serialized standalone files that are easy to share.

Failed HTTP requests are stored in

$TMPDIR/codemagic-cli-tools/failed-http-requests/YYYY-MM-DD/http-<method>-<status>-<url-path>-<timestamp>.json

and unexpected exceptions are saved in

$TMPDIR/codemagic-cli-tools/exceptions/YYYY-MM-DD/error-<error-type>-<timestamp>.json

@priitlatt priitlatt marked this pull request as ready for review July 25, 2022 09:47
@priitlatt priitlatt merged commit 994cc7b into master Jul 26, 2022
@priitlatt priitlatt deleted the logging/unexpected-errors-logging branch July 26, 2022 07:50
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