stevedlawrence commented on code in PR #954:
URL: https://github.com/apache/daffodil/pull/954#discussion_r1101428479
##########
project/Dependencies.scala:
##########
@@ -30,9 +30,11 @@ object Dependencies {
"xml-resolver" % "xml-resolver" % "1.2",
"commons-io" % "commons-io" % "2.11.0",
"com.typesafe" % "config" % "1.4.2",
- "org.apache.logging.log4j" %% "log4j-api-scala" % "12.0",
- "org.apache.logging.log4j" % "log4j-api" % "2.19.0",
- "org.apache.logging.log4j" % "log4j-core" % "2.19.0" % "it,test",
+ "com.typesafe.scala-logging" %% "scala-logging" % "3.9.4",
Review Comment:
Yep, we use the `scala.logging.Logger`. It's just a very thin wrapper around
an SLF4J logger, but the benefit is that if you do something like this:
```scala
Logger.debug.info(s"Some log message $with $some $expensive $variables")
```
Then using macros the ScalaLogger converts it to this:
```scala
if (Logger.isDebugEnabled) Logger.log.debug(s"Some log message $with $some
$expensive $variables")
```
This way if the debug log level isn't enabled, we never evaluate the string
with potentially expensive variables. If we don't have this wrapper and use
SLF4J directly, then we either need to manually wrap all our log calls in
conditionals or we'll just always evaluate the strings. So using scala-logging
should be faster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]