feat(logging): implement log pruning functionality
- Add LogPruneService to handle the deletion of old logs based on retention settings. - Create PruneLogsCommand to provide a console command for log pruning. - Introduce PruneLogsMessage and PruneLogsHandler for message handling related to log pruning. - Update the AST cache with new classes and their relationships.
This commit is contained in:
@@ -1989,4 +1989,12 @@ class AdminApiController extends BaseController
|
||||
'created_at' => (int) $l['createdAt'],
|
||||
], $rows), (int) $total, $page, $limit);
|
||||
}
|
||||
|
||||
#[Route('/api/v1/admin/logs', methods: ['DELETE'])]
|
||||
public function clearLogs(): JsonResponse
|
||||
{
|
||||
$deleted = $this->em->getRepository(AppLog::class)->deleteAll();
|
||||
|
||||
return $this->success(['deleted' => $deleted]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user