sorry for being picky about this detail, but doesn't this look better (if construction fails you will not get an instance back anyway):

    val system = ActorSystem(name, config)
    try {
      system.log.error("Danger! Danger!")
    } finally {
      system.shutdown()
    }