Skip to content
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

Remove .with_current_subscriber() calls #992

Merged
merged 3 commits into from
May 14, 2024

Commits on May 14, 2024

  1. Remove .with_current_subscriber() calls

    Those calls were introduced in e557095,
    with message:
    ```
    Now, when the driver spawns a task to run a new future on it, that
    future will use the same subscriber as the code that spawned the task in
    the first place.
    ```
    
    There is unfortunately no explanation about when it is necessary.
    I don't see any problems after removing those - logs are still collected
    correctly using a tracing subscriber.
    Those calls however have a harmful side-effect: they prevent usage of
    `log` loggers to listen to driver logs using `log` feature in `tracing`
    crate. After reporting the problem to `tracing` crate:
    tokio-rs/tracing#2913
    one of maintainers said that using `.with_current_subscriber()` in
    a library is not necessary in general.
    
    As I don't see any issue caused by removing these calls, but their
    existence cause an issue, they are removed in this commit.
    Lorak-mmk committed May 14, 2024
    Configuration menu
    Copy the full SHA
    5a50a57 View commit details
    Browse the repository at this point in the history
  2. Examples: add logging_log example

    This example demonstrates usage of `env_logger` to listen to driver logs.
    Lorak-mmk committed May 14, 2024
    Configuration menu
    Copy the full SHA
    01afc37 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    370b00a View commit details
    Browse the repository at this point in the history