-
Notifications
You must be signed in to change notification settings - Fork 173
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
refactor(tracing): Using tracing
instead of log
for logging
#895
Conversation
…subscriber Signed-off-by: gabrik <[email protected]>
tracing
instead of log
for loggingtracing
instead of log
for logging
tracing
instead of log
for loggingtracing
instead of log
for logging
1 similar comment
Signed-off-by: gabrik <[email protected]>
1 similar comment
@Mallets sister PRs have been created, did I miss some repo? |
Signed-off-by: gabrik <[email protected]>
Leaks could depend on this: tokio-rs/tracing#2069 |
@DenisBiryukov91 can you check if this memory leak is acceptable? |
The leeks indeed seem to come from tracing (originated from zenoh_utils::init_log). But I do not think we should consider any memory leaks as acceptable, unless we provide the user a (possibly unsafe) way to avoid them. Would it be possible to implement a log_close method similarly to what was done for ZRuntimePool drop / ZRuntimePoolGuard in zenoh-runtime ? |
Maybe it is possible, but I do not thing it can be done in Zenoh, I think it has to be done in The issue there is the Even is we "drop" the result of the call the subscriber will still be there, unless we plan to contribute something to tracing. |
It has to be done in |
will the tests pass if you do not call zenoh_utils::init_log() in the beginning of main, or initialize a logger with NoSubscriber ? |
There is a public function get_current, |
Signed-off-by: gabrik <[email protected]>
Yes on my machine the valgrind test passes without the call to |
Signed-off-by: gabrik <[email protected]>
For reference:
Using tracing makes |
…logging Signed-off-by: gabrik <[email protected]>
For reference: via
@Mallets this is worrying... |
with
|
P2P Results on C17Latency
Throughput
|
…r, thus no static leaks Signed-off-by: gabrik <[email protected]>
Adding a The new one is being used in the Valgrind tests. |
Signed-off-by: gabrik <[email protected]>
Signed-off-by: gabrik <[email protected]>
LGTM |
Replacing
log
withtracing
andenv_logger
withtracing_subscriber
.Added
init_log()
function tozenoh_util
as init tracing logging is a bit more complicated thanenv_logger::init()
Bindings Sister PRs:
Plugins/Backends Sister PRs:
Closes #894