-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use native console levels. #8
base: master
Are you sure you want to change the base?
Conversation
Allows using native devtools controls for choosing what shows up.
Thanks for the added thoughts, @anp. There have been several suggestions for adding higher customizability at this point (like in #3). I'm almost wondering if we should open up the API to be much more customizable through things like allowing you to replace the default formatter (like a What do you think? |
Super cool addition, by the way! I think this makes a lot of sense, I may add a configuration for this behavior to opt-out. |
Makes sense, yeah. What do you think about setting things up as Layers? Splitting the one layer into You could still have convenience functions like |
And yeah I think that having progressive levels of customization is very valuable and in line with tracing's philosophy AFAICT. |
@anp, awesome suggestion! I really like the idea of splitting them up as layers, and having a default set of layers for different environments. I can look at doing this next week. |
@@ -122,7 +139,14 @@ impl<S: Subscriber + for<'a> LookupSpan<'a>> Layer<S> for WASMLayer { | |||
"color: inherit", | |||
); | |||
} else { | |||
log1(&format!("{} {}{}", level, origin, recorder)); | |||
let output = format!("{}{}", origin, recorder); |
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.
Above here, it looks like we could still wire up log4, info4, debug4, etc
Notes for the future: if this is continued to be implemented, I would like it to be guarded by a config option |
Allows using native devtools controls for choosing what shows up, inheriting coloring from levels.
Open questions: