-
Notifications
You must be signed in to change notification settings - Fork 211
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
Implement Logging #56
Comments
@allantl I think it is a good idea. Honestly, I would be open to PRs for this one. When I have done logging I typically just accept it as side effecting and live with the "logger.info" calls. Obviously that is not very functional. The alternative I have seen is to use something like a State or Writer monad. I haven't done that myself yet, but would be an interesting exercise to see how it materializes in the app. I will leave this as an issue as it is valid and see if we get any PRs. When I get done some of the other issues, I will do some digging. |
I would say that an advantage of separation of interpretation as well as abstracting away the effect type makes introducing a writer monad easier |
The People have had discussions about this on the scala sub-reddit before. My company has followed suit with the |
Interesting, boo. Thanks for that info. Funny you mention that reddit post because I read it as well when I created this issue :) |
@pauljamescleary would you be interested in an integration of Log4Cats for the pet store? |
@nolledge That looks like an interesting library. This doesn't follow the tbh, I do this alot today, without a library, but it is done in the interpreters themselves... for {
_ <- IO(logger.warn(xxx))
x <- IO(doSomethingReal)
} yield x Kinda curious to see a PR |
@pauljamescleary @nolledge The main benefit of using Log4Cats is you can use it with several existing backends. BTW, it says it has |
Hi @nebtrx @pauljamescleary, Also the current logging mechanism in Doobie does not use an F[_] encoding.
https://github.com/nolledge/scala-pet-store/tree/feat/log4cats What do you guys think? |
@nolledge right! I haven't thought about that. I'll gladly take a look at it. |
doobie 0.7.x will probably have |
Hi, do you think it would be a good idea to add logging since its such a common use case in every project?
The text was updated successfully, but these errors were encountered: