Logging example using Writer Monad.