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

Introduce logging abstraction #455

Open
kubukoz opened this issue Dec 9, 2020 · 1 comment
Open

Introduce logging abstraction #455

kubukoz opened this issue Dec 9, 2020 · 1 comment

Comments

@kubukoz
Copy link
Collaborator

kubukoz commented Dec 9, 2020

In #345, potential changes to the way we do logging were mentioned, among others a Logger[F[_]] algebra.

To be considered:

@Paulymorph
Copy link

Do you consider separate logging wrappers over a Cache[F[_], V]? (Like it is done in sttp as a reference)
Like

class LoggingCache[F[_]: <Bounds>, V](underlying: Cache[F, V]) extends Cache[F, V] {
 // implement all the methods with logging
}

As I see it:
There won't be major changes in the Cache interface.
Caching logic is separated from logic.
The idea is rather straightforward and users will be able to produce their own logging wrappers.
Logging for independent integrations like slf4j or log4cats can be implemented in separate modules.
This adds some responsibility on the library users as they have to wrap the caches in logger wrappers manually.

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

2 participants