fix(logging): route EmailFetchException to email channel instead of app
This commit is contained in:
@@ -66,7 +66,7 @@ class FetchEmailNewsCommand extends ConsoleCommand
|
||||
return $this->handleSync($fetchEmailNewsAction, $verbose);
|
||||
} catch (EmailFetchException $e) {
|
||||
$this->error('❌ Ошибка Email: ' . $e->getMessage());
|
||||
Log::channel('app')->error('EmailFetchException', [
|
||||
Log::channel('email')->error('EmailFetchException', [
|
||||
'code' => $e->getCode(),
|
||||
'message' => $e->getMessage(),
|
||||
]);
|
||||
@@ -76,7 +76,7 @@ class FetchEmailNewsCommand extends ConsoleCommand
|
||||
$this->error('❌ Критическая ошибка: ' . $e->getMessage());
|
||||
$this->warn('Проверьте логи: storage/logs/laravel.log');
|
||||
|
||||
Log::channel('app')->error('Critical Error', [
|
||||
Log::channel('email')->error('Critical Error', [
|
||||
'error' => $e->getMessage(),
|
||||
'trace' => $e->getTraceAsString(),
|
||||
]);
|
||||
|
||||
@@ -38,13 +38,13 @@ class ParseEmailNewsController extends Controller
|
||||
"Обработано писем: {$result['processed_emails']}, но новостей не создано"
|
||||
);
|
||||
} catch (EmailFetchException $e) {
|
||||
Log::channel('app')->error('EmailFetchException', [
|
||||
Log::channel('email')->error('EmailFetchException', [
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
return redirect()->back()->with('error', $e->getMessage());
|
||||
} catch (\Exception $e) {
|
||||
Log::channel('app')->error('Критическая ошибка', [
|
||||
Log::channel('email')->error('Критическая ошибка', [
|
||||
'error' => $e->getMessage(),
|
||||
'trace' => $e->getTraceAsString(),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user