Skip to content

Quality of life updates for LoggerFactory#825

Merged
rossabaker merged 1 commit into
typelevel:mainfrom
morgen-peschke:qol-updates-to-LoggerFactory
Apr 2, 2024
Merged

Quality of life updates for LoggerFactory#825
rossabaker merged 1 commit into
typelevel:mainfrom
morgen-peschke:qol-updates-to-LoggerFactory

Conversation

@morgen-peschke

Copy link
Copy Markdown
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`.

@rossabaker rossabaker left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
@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.

2 participants