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

Quality of life updates for LoggerFactory #825

Merged

Conversation

morgen-peschke
Copy link
Contributor

Adds methods to return updated versions that configure the loggers they produce using addContext and withModifiedString.

This should make it easier to migrate from passing around a single SelfAwareStructuredLogger and using a LoggerFactory.

Adds methods to return updated versions that configure the loggers
they produce using `addContext` and `withModifiedString`.

This should make it easier to migrate from passing around a single
`SelfAwareStructuredLogger` and using a `LoggerFactory`.
Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

I don't know what the LoggerFactoryGen supertype is for, but I'll ask: would this have worked on LoggerFactoryGen? I think probably not, because then it wouldn't be able to return a LoggerFactory?

Assuming that's a bad idea, 👍

@morgen-peschke
Copy link
Contributor Author

I don't know what the LoggerFactoryGen supertype is for, but I'll ask: would this have worked on LoggerFactoryGen? I think probably not, because then it wouldn't be able to return a LoggerFactory?

Assuming that's a bad idea, 👍

I'm pretty sure that it couldn't go on LoggerFactoryGen because they get passed through to methods which aren't on Logger, so we need the constraint that LoggerFactory adds that LoggerFactoryGen#LoggerType is SelfAwareStructuredLogger[F] instead of any Logger[F] subtype.

@rossabaker rossabaker merged commit 8de6686 into typelevel:main Apr 2, 2024
14 checks passed
@morgen-peschke morgen-peschke deleted the qol-updates-to-LoggerFactory branch April 2, 2024 19:23
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.

None yet

2 participants