reformat log messages