public function logError(\Exception $e, $detailLevel = 1, $level = 1) {
    if ($detailLevel >= 5) {
      return $this->log("\n".'ERROR: '.\Psc\Exception::getExceptionText($e, 'text'));
    } else {
      return $this->log("\n".'ERROR: Exception: '.$e->getMessage(), $level);
    }
  }