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

fix(rpc): Prevents early provider exit when logger is set #93

Merged

Conversation

thomastaylor312
Copy link
Contributor

Previous to this change, if a provider set a logger, it would cause the provider
to exit early. This changes the setup to simply log a message if the provider
already created a logger rather than exiting early

crate::channel_log::init_receiver(log_rx);
match crate::channel_log::init_logger() {
Ok(log_rx) => crate::channel_log::init_receiver(log_rx),
// TODO(thomastaylor312): This is brittle, but the init_logger function is public and this
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are ok with this for now, I'll create an issue before merging this PR to address this

Previous to this change, if a provider set a logger, it would cause the provider
to exit early. This changes the setup to simply log a message if the provider
already created a logger rather than exiting early

Signed-off-by: Taylor Thomas <taylor@cosmonic.com>
@thomastaylor312 thomastaylor312 linked an issue Mar 7, 2022 that may be closed by this pull request
@thomastaylor312 thomastaylor312 merged commit c789836 into wasmCloud:main Mar 7, 2022
@thomastaylor312 thomastaylor312 deleted the fix/provider_log_init branch March 7, 2022 22:16
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

Successfully merging this pull request may close these issues.

[BUG] provider_run does not gracefully initialize logger
2 participants