feat(logging): migrate remaining files to app channel — all Log:: calls now use domain channels

This commit is contained in:
F4ilji
2026-07-05 23:32:01 +05:00
parent 6bc1b3e921
commit 769b2ff342
17 changed files with 50 additions and 50 deletions
@@ -38,9 +38,9 @@ class PostSliderService
]);
$post->slide()->save($slide);
Log::info('Slide created successfully', ['postTitle' => $this->post->title]);
Log::channel('app')->info('Slide created successfully', ['postTitle' => $this->post->title]);
} catch (\Exception $e) {
Log::error('Failed to create slide', [
Log::channel('app')->error('Failed to create slide', [
'postTitle' => $this->post->title,
'error' => $e->getMessage(),
]);
@@ -71,7 +71,7 @@ class PostSliderService
]);
} catch (\Exception $e) {
Log::error('Failed to update MainSlider', [
Log::channel('app')->error('Failed to update MainSlider', [
'postTitle' => $this->post->title,
'error' => $e->getMessage(),
]);
@@ -61,7 +61,7 @@ class StaticFileSearch
return $this->paginateResults($results, $page, $categories);
} catch (\Exception $e) {
Log::error('Search error: ' . $e->getMessage());
Log::channel('app')->error('Search error: ' . $e->getMessage());
return [
'data' => [],
'meta' => [
@@ -103,7 +103,7 @@ class StaticFileSearch
$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 [];
}
@@ -130,7 +130,7 @@ class StaticFileSearch
return $index;
} catch (\Exception $e) {
Log::error('Index creation error: ' . $e->getMessage());
Log::channel('app')->error('Index creation error: ' . $e->getMessage());
return [];
}
});
@@ -181,7 +181,7 @@ class StaticFileSearch
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;
}
}
@@ -212,7 +212,7 @@ class StaticFileSearch
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;
}
}