-
-
Notifications
You must be signed in to change notification settings - Fork 164
Timer logging should be switched to a flag. #1081
Comments
part of resolve #1085 not implemented flag system |
hi there I am new to rust
should the changes be like this? |
or should i use #[cfg(feature = "debug")] ? |
It's a similar feeling, but I hope that the ratings for debug, information, error, etc. will be divided |
Do you mean we need to create another flag for logging? |
Do you mean we need to create another flag for logging? Something like this: #[cfg(feature = "log")] |
I know that you can't assign a value to a feature flag. What I'm envisioning is to divide the log levels and ignore logs below a certain level by a certain value at compile time. Of course, the above is just my wishful thinking. The purpose of the feature is to make it work without bugs in NAPI, WASM, and not to have logs that are not needed. And just in case it's confusing, we'll mention the |
Yeah, feature flags are quite limited. We may create our own macro for logging which invokes macros from tracing. cargo feature:
|
Can you guys guide me on how to implement this? |
What guide do you want? https://docs.rs/log/latest/log/ btw, The following structure also looks good. |
https://github.com/dudykr/stc/blob/main/crates/stc_ts_type_checker/src/lib.rs#L91-L107
Suggest solution
mapping function, and take flag
The text was updated successfully, but these errors were encountered: