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

Panic logs should appear both in the standard log and the error log files #445

Closed
coderofstuff opened this issue Mar 28, 2024 · 2 comments
Closed
Assignees
Labels
good first issue Good for newcomers

Comments

@coderofstuff
Copy link
Collaborator

coderofstuff commented Mar 28, 2024

Describe the bug
Currently, panic logs only appear in the console and not in log files (both error and standard log file). It should appear in both error logs and the standard logs file.

To Reproduce
Steps to reproduce the behavior:

  1. Run the node: cargo run --bin kaspad
  2. Do anything that causes it to panic
  3. The logs only show up on the console

Expected behavior
The panic logs shows up on both log files

Additional context
First point of contact: core/src/panic.rs

@coderofstuff coderofstuff added the good first issue Good for newcomers label Mar 28, 2024
@gvbgduh
Copy link
Contributor

gvbgduh commented Apr 4, 2024

taking this one

gvbgduh added a commit to gvbgduh/rusty-kaspa that referenced this issue Apr 4, 2024
gvbgduh added a commit to gvbgduh/rusty-kaspa that referenced this issue Apr 4, 2024
gvbgduh added a commit to gvbgduh/rusty-kaspa that referenced this issue May 1, 2024
michaelsutton pushed a commit that referenced this issue May 1, 2024
* Write panic errors to logs (#445)

* Remove the comment as it doesn't need to be addressed

Reason: Waiting here will block the thread, and as the thread is locked
and we wait for the logger system to be initiated that would wait for
the thread to be released itself, making the waiting pointless

* Add column to the log message for the panic error

* Move panic setup after the logger init in all places

* Add the thread name to the panic error

* default hook invoke position + minor style changes
@coderofstuff
Copy link
Collaborator Author

Fixed by #446

smartgoo pushed a commit to smartgoo/rusty-kaspa that referenced this issue Jun 18, 2024
* Write panic errors to logs (kaspanet#445)

* Remove the comment as it doesn't need to be addressed

Reason: Waiting here will block the thread, and as the thread is locked
and we wait for the logger system to be initiated that would wait for
the thread to be released itself, making the waiting pointless

* Add column to the log message for the panic error

* Move panic setup after the logger init in all places

* Add the thread name to the panic error

* default hook invoke position + minor style changes
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this issue Jul 12, 2024
* Write panic errors to logs (kaspanet#445)

* Remove the comment as it doesn't need to be addressed

Reason: Waiting here will block the thread, and as the thread is locked
and we wait for the logger system to be initiated that would wait for
the thread to be released itself, making the waiting pointless

* Add column to the log message for the panic error

* Move panic setup after the logger init in all places

* Add the thread name to the panic error

* default hook invoke position + minor style changes
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this issue Jul 17, 2024
* Write panic errors to logs (kaspanet#445)

* Remove the comment as it doesn't need to be addressed

Reason: Waiting here will block the thread, and as the thread is locked
and we wait for the logger system to be initiated that would wait for
the thread to be released itself, making the waiting pointless

* Add column to the log message for the panic error

* Move panic setup after the logger init in all places

* Add the thread name to the panic error

* default hook invoke position + minor style changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants