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

Enable Logging for RabbitMQ Component #564

Closed
eerhardt opened this issue Oct 28, 2023 · 2 comments · Fixed by #662
Closed

Enable Logging for RabbitMQ Component #564

eerhardt opened this issue Oct 28, 2023 · 2 comments · Fixed by #662
Assignees
Labels
area-integrations Issues pertaining to Aspire Integrations packages

Comments

@eerhardt
Copy link
Member

RabbitMQ doesn't work directly with ILogger. However, it does have an EventSource. See https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/a0321c6c2203cedeacdd5c1ec5bcdc924e85a842/projects/RabbitMQ.Client/client/logging/RabbitMqClientEventSource.cs#L38.

We could listen to that EventSource and pipe the EventSource events to an ILogger so the messages get logged correctly.

@eerhardt eerhardt added the area-integrations Issues pertaining to Aspire Integrations packages label Oct 28, 2023
@eerhardt eerhardt added this to the preview/.NET 8 GA milestone Oct 28, 2023
@eerhardt eerhardt self-assigned this Nov 1, 2023
eerhardt added a commit that referenced this issue Nov 1, 2023
eerhardt added a commit that referenced this issue Nov 2, 2023
Add an EventSource listener to listen to the RabbitMQ event source which logs info, warn, and error messages. Forward these messages to an ILogger.

Fix #564
eerhardt added a commit that referenced this issue Nov 2, 2023
Add an EventSource listener to listen to the RabbitMQ event source which logs info, warn, and error messages. Forward these messages to an ILogger.

Fix #564
eerhardt added a commit that referenced this issue Nov 2, 2023
* Implement RabbitMQ logging

Add an EventSource listener to listen to the RabbitMQ event source which logs info, warn, and error messages. Forward these messages to an ILogger.

Fix #564

* Stop coding like a dinosaur.
eerhardt added a commit that referenced this issue Nov 2, 2023
* Implement RabbitMQ logging

Add an EventSource listener to listen to the RabbitMQ event source which logs info, warn, and error messages. Forward these messages to an ILogger.

Fix #564

* Stop coding like a dinosaur.
@eerhardt
Copy link
Member Author

eerhardt commented Nov 2, 2023

Reopening to backport to preview1.

@eerhardt eerhardt reopened this Nov 2, 2023
davidfowl pushed a commit that referenced this issue Nov 2, 2023
* Implement RabbitMQ logging

Add an EventSource listener to listen to the RabbitMQ event source which logs info, warn, and error messages. Forward these messages to an ILogger.

Fix #564

* Stop coding like a dinosaur.
@eerhardt
Copy link
Member Author

eerhardt commented Nov 2, 2023

Fixed with #665

@eerhardt eerhardt closed this as completed Nov 2, 2023
joperezr added a commit that referenced this issue Nov 14, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant