feat(logging): migrate remaining files to app channel — all Log:: calls now use domain channels
This commit is contained in:
@@ -15,7 +15,7 @@ class ClearStaticSearchCacheAction
|
||||
Cache::forget(self::CACHE_KEY);
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Cache clear error: ' . $e->getMessage());
|
||||
Log::channel('app')->error('Cache clear error: ' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class SearchStaticFilesAction
|
||||
|
||||
return app(PaginateSearchResultsTask::class)->run($results, $page, self::PER_PAGE, $categories);
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Search error: ' . $e->getMessage());
|
||||
Log::channel('app')->error('Search error: ' . $e->getMessage());
|
||||
return [
|
||||
'data' => [],
|
||||
'meta' => [
|
||||
@@ -77,7 +77,7 @@ class SearchStaticFilesAction
|
||||
|
||||
return null;
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Failed to get H1: ' . $e->getMessage());
|
||||
Log::channel('app')->error('Failed to get H1: ' . $e->getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class BuildStaticFileIndexTask
|
||||
$directory = public_path(self::FILES_DIR);
|
||||
|
||||
if (!is_dir($directory)) {
|
||||
Log::error("Directory not found: {$directory}");
|
||||
Log::channel('app')->error("Directory not found: {$directory}");
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class BuildStaticFileIndexTask
|
||||
|
||||
return $index;
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Index creation error: ' . $e->getMessage());
|
||||
Log::channel('app')->error('Index creation error: ' . $e->getMessage());
|
||||
return [];
|
||||
}
|
||||
});
|
||||
@@ -80,7 +80,7 @@ class BuildStaticFileIndexTask
|
||||
|
||||
return null;
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Failed to get H1: ' . $e->getMessage());
|
||||
Log::channel('app')->error('Failed to get H1: ' . $e->getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class GetStaticFileCategoriesTask
|
||||
try {
|
||||
$file = public_path(self::FILES_DIR . '/' . 'index.html');
|
||||
if (!file_exists($file)) {
|
||||
Log::error("Category index file not found: {$file}");
|
||||
Log::channel('app')->error("Category index file not found: {$file}");
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class GetStaticFileCategoriesTask
|
||||
$dropdownMenu = $document->first('ul.dropdown-menu');
|
||||
|
||||
if ($dropdownMenu === null) {
|
||||
Log::warning("Dropdown menu not found in category index file: {$file}");
|
||||
Log::channel('app')->warning("Dropdown menu not found in category index file: {$file}");
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class GetStaticFileCategoriesTask
|
||||
|
||||
return $categories;
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Error extracting categories: ' . $e->getMessage());
|
||||
Log::channel('app')->error('Error extracting categories: ' . $e->getMessage());
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user