File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 22
33Scala Logging is a ** convenient** and ** performant** logging library wrapping [ SLF4J] ( http://www.slf4j.org ) .
44
5- It's convenient, because you can simply call log methods without checking whether the respective log level is enabled:
5+ It's convenient, because you can simply call log methods, * without* checking whether the respective log level is enabled:
66
77``` scala
88logger.debug(s " Some $expensive message! " )
99```
1010
11- It's performant, because thanks to Scala macros the * check-enabled-idiom* is applied, just like writing this more involved code :
11+ It's performant, because thanks to Scala macros the * check-enabled-idiom* is applied and the following code is generated :
1212
1313``` scala
1414if (logger.isDebugEnabled) logger.debug(s " Some $expensive message! " )
@@ -20,11 +20,10 @@ if (logger.isDebugEnabled) logger.debug(s"Some $expensive message!")
2020* Scala 2.11 or 2.12
2121* Logging backend compatible with SLF4J
2222
23- One logging backend can be [ Logback] ( http://logback.qos.ch ) , you can add it to your sbt build definition (the most
24- recent version can be found here: http://logback.qos.ch/download.html ):
23+ A compatible logging backend is [ Logback] ( http://logback.qos.ch ) , add it to your sbt build definition:
2524
2625``` scala
27- libraryDependencies += " ch.qos.logback" % " logback-classic" % " 1.1.7"
26+ libraryDependencies += " ch.qos.logback" % " logback-classic" % " 1.1.7"
2827```
2928
3029If you are looking for a version compatible with Scala 2.10, check out Scala Logging 2.x.
You can’t perform that action at this time.
0 commit comments