Added log message formatting