Mainly improvements to log formatting