Open
Conversation
c507c12 to
1ccb243
Compare
log4cats integrationlog4cats integration
igor-ramazanov
commented
Feb 22, 2025
| val callingMethodIndex = stacktraceElements.size - lastIndex | ||
| val callingMethod = stacktraceElements(callingMethodIndex) | ||
| val fileName = | ||
| (callingMethod.getClassName.replace('.', '/') + ".scala").split("\\/").takeRight(1).mkString |
Author
There was a problem hiding this comment.
On JS it returns something like (<jscode>.scala:96229), not sure how to get a source file / line number.
Author
There was a problem hiding this comment.
log4cats doesn't support sourcecode info, but it's a requirement for woof.
Perhaps, I could create a variant of Logger#doLog which doesn't require LogInfo to facilitate log4cats integration.
igor-ramazanov
commented
Feb 22, 2025
Comment on lines
46
to
50
| override def isErrorEnabled: F[Boolean] = Applicative[F].pure(true) | ||
| override def isWarnEnabled: F[Boolean] = Applicative[F].pure(true) | ||
| override def isInfoEnabled: F[Boolean] = Applicative[F].pure(true) | ||
| override def isDebugEnabled: F[Boolean] = Applicative[F].pure(true) | ||
| override def isTraceEnabled: F[Boolean] = Applicative[F].pure(true) |
Author
There was a problem hiding this comment.
Not sure if it's a problem, but log level filtering works.
Collaborator
There was a problem hiding this comment.
We have something similar in the slf4j-module:
it should probably be reflected as a limitation in the docs
1ccb243 to
b39dfe2
Compare
b39dfe2 to
50265ab
Compare
Collaborator
|
Sorry, I missed this one in the scala steward noise. I'll give it a look next week when I'm back to work :) |
log4cats integrationlog4cats integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
log4catsintegration withoutslf4jmiddleman.Allows using Woof with the new
http4s-1.xas it requiresLoggerFactory[F]forEmberClientBuilderandEmberServerBuilder.Works on JVM.
On JS test needs to be fixed - the
LogInfois a little wonky there.Couldn't run Native locally, apparently it hangs on linking.
Failed to run
mdoctoo.