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

Allow applications to specify their own logger instance #3792

Merged
merged 5 commits into from
Oct 10, 2023

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Oct 9, 2023

Allow clients to specify a logger instance when instantiating a matrix client via the ClientOpts.

This is is particularly useful for clients that want to support multiple matrix accounts, but I also want to use it in the cypress tests.

It builds on the work done by @clokep in #3484, and replaces that PR.

It's not yet complete - there are still lots of places that use the global logger - but it puts the framework in place and catches quite a lot of the main culprits.

Fixes #1899.


Here's what your changelog entry will look like:

✨ Features

clokep and others added 4 commits October 9, 2023 17:01
Copy link
Contributor

@florianduros florianduros left a comment

Choose a reason for hiding this comment

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

Oh, it was put back in draft, didn't see it in my notification. Ignore my review.

@florianduros florianduros self-requested a review October 10, 2023 08:36
@richvdh
Copy link
Member Author

richvdh commented Oct 10, 2023

@florianduros I put it back in draft while I fixed the tests, which I've now done - are you still happy?

I don't think it's going to be practical to meet the coverage gate on this PR since it hits a range of existing code with poor coverage.

Copy link
Contributor

@florianduros florianduros left a comment

Choose a reason for hiding this comment

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

:shipit:

@richvdh richvdh merged commit 42be793 into develop Oct 10, 2023
@richvdh richvdh deleted the rav/logging_work branch October 10, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to have a a logger per MatrixClient
3 participants