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

Improve panic capture dumps #183

Open
tauraamui opened this issue Jul 29, 2024 · 1 comment
Open

Improve panic capture dumps #183

tauraamui opened this issue Jul 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@tauraamui
Copy link
Owner

The panic capture writes should probably be prefixed with some kind of timestamp for easier tracking of issues.

@tauraamui tauraamui added the enhancement New feature or request label Jul 29, 2024
@tauraamui tauraamui moved this to 🆕 New in Lilly Editor Team Jul 29, 2024
@tauraamui tauraamui moved this from 🆕 New to 📋 Backlog in Lilly Editor Team Jul 29, 2024
@tauraamui tauraamui moved this from 📋 Backlog to 🏗 In progress in Lilly Editor Team Jul 29, 2024
@tauraamui
Copy link
Owner Author

Turns out this is pretty hard to do..

#include <fcntl.h>

fn C.open(const_pathname &char, flags int, mode int) int

fn persist_stderr_to_disk() {
    fd := C.open(c'lilly.panic.log', C.O_CREAT | C.O_WRONLY | C.O_APPEND, 0o666)
    C.dup2(fd, C.STDERR_FILENO)
}

is how the panic invocation currently gets captured we just tell the proc to redirect stderr to the file lilly.panic.log, and that's it. I am unsure at this time how to per panic dump to prefix the unknown sized data being frantically written to disk before termination with a timestamp. This will need further investigation as a nice to have. For now though I don't want to waste any more time on this so it's going into On Hold.

@tauraamui tauraamui moved this from 🏗 In progress to ✋ On Hold in Lilly Editor Team Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: ✋ On Hold
Development

No branches or pull requests

1 participant