Comments (4)
if you're not compiling with an error layer it's probably safe to just disable all the tracing support with default-features = false
. that should hopefully disable the warning
from color-eyre.
Thanks, it's good to know it is a compile time flag. Unfortunately the problem is I do want span traces some of the time, and ideally I'd like to distribute it to users as such (right now I've been adding it if RUST_BACKTRACE
or RUST_LIB_BACKTRACE
is present in the environment).
There are some cases where it is incredibly useful, just not the default. I can imagine a couple issues where I might ask a user for a span trace, but in the case of the example above (a user typo'd a piece of config) it's just not useful there?
from color-eyre.
Oh okay. I think the solution is just to add some check of an env variable before capturing SpanTraces when constructing Reports. If the error layer isn't setup but the SpanTrace is None it should skip printing the warning.
I think I'd still prefer to default to capturing SpanTraces, so it would only not capture them if the RUST_SPANTRACE
variable is defined and set to 0. You would need to explicitly check if the variable is unset on startup and set it to 0 with std::env::set_var
, would this work for you?
from color-eyre.
Yep! That'd be more than fine.
from color-eyre.
Related Issues (20)
- Report creation takes a lock HOT 3
- Print a backtrace/spantrace to debug logs not to stderr HOT 1
- panic in tests (I used master) HOT 1
- Is there an easy way to make custom errors have equivalent report functions HOT 1
- show sections when panic macro is called HOT 1
- Output has few/no colors in Gnome Terminal
- should info! events be captured and printed as part of the SpanTrace? HOT 1
- Mechanism to add sections in hook callback
- Omit numbering of errors if there's only one HOT 2
- color-eyre uses the same inexplicable information order as standard backtraces HOT 1
- Automate synchronization between docs.rs and README.md
- Disable setting panic hook HOT 2
- Ergonomics: Full re-exports from `eyre`; export `color_eyre::eyre!` macro, rather than `eyre` crate HOT 2
- Add a config option to print panic output to stdout.
- First eyre::Result::Err variant is slow to construct if backtraces are enabled
- Construct a new `Handler` after already having created one / modify handler HOT 1
- Wrap types so we don't have to re-export `owo_colors` HOT 2
- New version of backtrace doesn't export `gimli-symbolize` anymore
- Suggestions only displayed when printing the Debug of an error, not Display HOT 1
- Reverse order for stacktrace HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from color-eyre.