Skip to content
Convenient and performant logging
Find file
New pull request
Pull request Compare This branch is 59 commits behind typesafehub:master.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Scala logging library wrapping the Java logging facility. If you want to use it together with SLF4J or Logback, just use the JUL to SLF4J bridge.

In principle the evaluation of log messages should be avoided if the given log level is not enabled. Hence we should write the following code to log at the INFO level:

if (logger.isLoggable(Level.INFO))"Some %s message!".format("expensive"))

Yet this idiom is too heavyweight, so that many of us just omit the "loggable check", which in turn could lead to performance issues. Fortunately Scala macros can be used to make our lives easier: ScalaLogging offers the class Logger with "lightweight" logging methods that will be expanded to the above idiom. So all we have to write is:"Some %s message!".format("expensive"))

In addition ScalaLogging offers the trait Logging which conveniently provides a logger instance initialized with the name of the class mixed into:

class MyClass extends Logging {"This is very convenient ;-)")


  • Scala 2.10 (because of macros)

Contribution policy

Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so.


This code is open source software licensed under the Apache 2.0 License. Feel free to use it accordingly.

Something went wrong with that request. Please try again.