format log output