-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add structured equivalents of Writer & WriterT loggers #719
Add structured equivalents of Writer & WriterT loggers #719
Conversation
core/shared/src/main/scala/org/typelevel/log4cats/extras/WriterTStructuredLogger.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, for surfacing the test code as much as the WriterT.
core/shared/src/main/scala/org/typelevel/log4cats/extras/WriterStructuredLogger.scala
Outdated
Show resolved
Hide resolved
core/shared/src/main/scala/org/typelevel/log4cats/extras/WriterTStructuredLogger.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot. Useful with the right safety precautions, disastrous without, and a clear explanation which is which.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, such great PR is stuck for no reason! I dropped a minor question, so feel free to pass it over.
* A `SelfAwareLogger` implemented using `cats.data.Writer`. | ||
* | ||
* >>> WARNING: READ BEFORE USAGE! <<< | ||
* /~https://github.com/typelevel/log4cats/blob/main/core/shared/src/main/scala/org/typelevel/log4cats/extras/README.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to put these warnings on the microsite and leave here the link on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC neither of these classes is on the microsite, so putting the warning there might draw people to them, rather than nudge them towards less niche classes.
Adds
WriterStructuredLogger
andWriterTStructuredLogger
as equivalents ofWriterLogger
andWriterTLogger
, respectively.Implements #718