rust-cli / human-panic

Panic messages for humans.
https://docs.rs/human-panic
Apache License 2.0
1.66k stars 65 forks source link

Crate shown in log file is not expected crate #19

Closed colindean closed 6 years ago

colindean commented 6 years ago

🐛 bug report

Expected Behavior

When I look at the generated log file, I expect to see the name of my own crate, the current version, and some information.

Current Behavior

I see a panic as if I'm inside the human-panic crate.

name = "human-panic"
operating_system = "unix:OSX"
crate_version = "0.2.0"
explanation = "Cause: Oh snap. Panic occurred in file 'src/main.rs' at line 69\n"
method = "Panic"

Possible Solution

No idea.

Context

I'm trying to set it up in a small CLI app.

Code Sample

Unfortunately, it's in proprietary code so I cannot link to it, but this is what I've got:

 fn main() {
  setup_panic!();
  panic!("Oh snap");

I'm literally just testing it out, it's working, but the outputted log file isn't what I expected.

Your Environment

Software Version(s)
Package my own, proprietary
Runtime rustc?
Package Manager homebrew/rustup
Operating System macOS 10.13.4
killercup commented 6 years ago

Will be fixed by #15

colindean commented 6 years ago

Confirmed fixed in 0.3.0. Thank you!