{"record":{"id":"165df5ebd5cd99c6","repo":"phacility/phabricator","slug":"you-can-not-both-enable-and-disable-the-lo","errorCode":null,"errorMessage":"You can not both \"--enable\" and \"--disable\" the lock log.","messagePattern":"You can not both \"--enable\" and \"--disable\" the lock log\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php","lineNumber":33,"sourceCode":"          ),\n          array(\n            'name' => 'disable',\n            'help' => pht('Disable the lock log.'),\n          ),\n          array(\n            'name' => 'name',\n            'param' => 'name',\n            'help' => pht('Review logs for a specific lock.'),\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $is_enable = $args->getArg('enable');\n    $is_disable = $args->getArg('disable');\n\n    if ($is_enable && $is_disable) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'You can not both \"--enable\" and \"--disable\" the lock log.'));\n    }\n\n    $with_name = $args->getArg('name');\n\n    if ($is_enable || $is_disable) {\n      if (strlen($with_name)) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'You can not both \"--enable\" or \"--disable\" with search '.\n            'parameters like \"--name\".'));\n      }\n\n      $gc = new PhabricatorDaemonLockLogGarbageCollector();\n      $is_enabled = (bool)$gc->getRetentionPolicy();\n\n      $config_key = 'phd.garbage-collection';","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php#L15-L51","documentation":"Error \"You can not both \"--enable\" and \"--disable\" the lock log.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}