In most of our Scala code, we rely on the LazyLogging trait to create a Logger for us to use. LazyLogging initializes that Logger lazily, which has some overhead associated with it. Since we generally want a Logger when we use the LazyLogging trait, we may as well switch to using the StrictLogging trait to save some overhead.
In should be noted that, in cases where the Logger isn't always used, switching to StrictLogging will increase memory usage (stack). However, LazyLogging increases memory usage (heap) anyway, so I doubt the difference will be noticeable. Especially since I believe we normally use the loggers that we ask for. And, again, we save some CPU cycles by using StrictLogging.
- All usages of LazyLogging are replaced with StrictLogging.