-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
add crash-report capabilities #574
Conversation
main.go
Outdated
fileName := "crashreport_" + time.Now().Format("20060102150405") + ".txt" | ||
currDir, err := osext.ExecutableFolder() | ||
if err != nil { | ||
panic(err) |
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.
I don't know if it's correct to panic inside a defer
function. Maybe it's better to log the error. Returning the error is not possible.
Problems still to be solved:
|
I've changed the approach: now everything happening on stderr is redirected to the crash-report saved locally. I've followed this issue There's still work to do regarding stdout and stderr. Now every output is redirected to the file (maybe because stdout and stderr are treated the same way(?)) |
Example of crash-report generated on windows. |
Useful suggestions/enhancements:
|
78dd953
to
ac0f713
Compare
Now the user should be able to optionally enable crash-report generation changing |
…ort" This reverts commit e539837.
The output of GIN debug was redirected to stderr instead of stdout
1b49a47
to
774959c
Compare
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 ❤️
* uniform `test.yml` to `release.yml` * added again #561 for testing purposes * add win64 build in and refactor taskfile * change min supported macOS version to 10.11 (also go 1.14) * hard-code gon config in a step for uniformity and ease * refactor and optimize Taskfile (✨) change also workflows accordingly * add another win CI matrix to build win 32-64 * add win 32/64 to all the jobs in the release workflow & optimizations 🧙🏻
* change approach: redirect stderr to file instead using defer * update gin dependency because of gin-gonic/gin#1571 * set default logger to stdout. (stderr is currently redirected to file) * save crash-report to newly created `logs/` folder * add enable/disable crash-report generation (default off) * add entry in trayicon's menu to remove crash-reports (if there are any) * CI polishing, add win64, update macOS min version (#578)
Please check if the PR fulfills these requirements
before creating one)
feature
Sometimes the agent crashes without apparent reason
A folder containing crash-reports is generated in that same folder containing the executable (e.g. in Linux it's in
~/ArduinoCreateAgent-<version>/logs
) when the agent crashes. It should allow users to better report issues, and developers to better understand and fix bugs.The file created inside the folder is named
crashreport_yyyyMMddHHmmss.log
and should contain something like:no