Added the writing of log messages to a cache (2)

 - addressed review comments