put a linebreak here before the if:

private val logDir = 
  if (XXX)...