code to dump log messages