Logging is something we all need to do. There are a many logging frameworks available with various layers of abstraction (logback, slf4j, scalalogging etc). These libraries are all side effecting. As good functional programmers we want defer side effects and push them to the boundaries of the system.
You can find complete examples of the concepts discussed on my blog in my Github repo. In particular, check out the Writer monad example The problem with logging So what exactly is the problem with logging?