Quiet the logs and capture the errors that were missing
- Activity page: "Delete all" empties the open tab (api/admin/logs/clear-logs, super admin only, logged under system) - Stop logging every WebSocket connect - Log unexpected API errors (safeErrorMessage -> logUnexpectedError), every failed bot job attempt and every job the queue lost - Drop the cron jobs' console output; a failed model sync goes to the logs Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -78,6 +78,20 @@ export default function useLogsListInit(_props?: Props) {
|
||||
setRes(undefined);
|
||||
};
|
||||
|
||||
/**
|
||||
* The tab was emptied: back to its first page, reloaded.
|
||||
*/
|
||||
const afterClear = () => {
|
||||
setSelectedIds([]);
|
||||
|
||||
if (page > 1) {
|
||||
setPage(1);
|
||||
return;
|
||||
}
|
||||
|
||||
setRes(undefined);
|
||||
};
|
||||
|
||||
const all_selected =
|
||||
Boolean(logs?.[0]) && selected_ids.length == logs?.length;
|
||||
|
||||
@@ -100,6 +114,7 @@ export default function useLogsListInit(_props?: Props) {
|
||||
toggleSelectAll,
|
||||
all_selected,
|
||||
afterDelete,
|
||||
afterClear,
|
||||
active_log,
|
||||
openLog,
|
||||
log_modal_open,
|
||||
|
||||
Reference in New Issue
Block a user