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

Logging: allow setting log level more than once #115

Open
Gor027 opened this issue Jun 15, 2023 · 0 comments
Open

Logging: allow setting log level more than once #115

Gor027 opened this issue Jun 15, 2023 · 0 comments

Comments

@Gor027
Copy link
Contributor

Gor027 commented Jun 15, 2023

After #111 was merged, setting the logging level by calling cass_log_set_level implied that a global tracing subscriber is set for the duration of the entire program. As the default global subscriber can be set only once, later attempts to set the logging level are ignored. Although the logging configuration should not be changed after a session is established, this limitation is too restrictive, so perhaps it is possible to avoid it by setting a default subscriber for each thread before they start an execution:
https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.on_thread_start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant