	public function admin_log($mode = '')
	{
		$errorLogPath = TMP . 'logs' . DS . 'error.log';
		switch($mode) {
			case 'download':
				set_time_limit(0);
				if ($this->_downloadErrorLog()) {
					exit();
				}
				$this->BcMessage->setInfo('エラーログが存在しません。');
				$this->redirect(['action' => 'log']);
				break;
			case 'delete':
				$this->_checkSubmitToken();
				if (file_exists($errorLogPath)) {
					if (unlink($errorLogPath)) {
						$messages[] = __d('baser', 'エラーログを削除しました。');
						$error = false;
					} else {
						$messages[] = __d('baser', 'エラーログが削除できませんでした。');
						$error = true;
					}
				} else {
					$messages[] = __d('baser', 'エラーログが存在しません。');
					$error = false;
				}

				if ($messages) {
					$this->BcMessage->set(implode("\n", $messages), $error);
				}
				$this->redirect(['action' => 'log']);
				break;

		}

		$fileSize = 0;
		if (file_exists($errorLogPath)) {
			$fileSize = filesize($errorLogPath);
		}

		$this->pageTitle = __d('baser', 'データメンテナンス');
		$this->help = 'tools_log';
		$this->set('fileSize', $fileSize);
	}
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.