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

Structure Hierarchy and Structured Logger Modification Function #48

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

ChristopherDavenport
Copy link
Member

@ChristopherDavenport ChristopherDavenport commented Jun 23, 2018

Addresses a way of dealing with #44, so now we have a concrete solution.

@@ -10,4 +10,13 @@ trait StructuredLogger[F[_]] extends Logger[F] {

object StructuredLogger{
def apply[F[_]](implicit ev: StructuredLogger[F]): StructuredLogger[F] = ev

def withContext[F[_]](sl: StructuredLogger[F])(ctx: (String, String)*): MessageLogger[F] =
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this function worth this shift? Even if primarily invisible to the user.

@lorandszakacs
Copy link
Member

I like this proposal, and it opens up new avenues of combining stuff. For instance: why couldn't (wouldn't) we have a similar StructuredLogger for errors as well?

@ChristopherDavenport
Copy link
Member Author

Alright, I think after we merge this it may be appropriate to start with some binary compatible versions as presently this seems sufficiently stable for most purposes.

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