feat(StoreStorageSend): 添加错误日志记录到队列消费失败时
This commit is contained in:
parent
ac9a921ee8
commit
c42b9a5033
@ -109,6 +109,7 @@ class StoreStorageSend implements Consumer
|
|||||||
public function onConsumeFailure(\Throwable $e, $package)
|
public function onConsumeFailure(\Throwable $e, $package)
|
||||||
{
|
{
|
||||||
$package['max_attempts'] = 0;
|
$package['max_attempts'] = 0;
|
||||||
|
Log::error('store-storage队列消费失败: ' . $e->getMessage() . ',line:' . $e->getLine() . ',file:' . $e->getFile());
|
||||||
return $package;
|
return $package;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ return [
|
|||||||
'constructor' => [
|
'constructor' => [
|
||||||
runtime_path() . '/logs/'.date('Ym').'/.log',
|
runtime_path() . '/logs/'.date('Ym').'/.log',
|
||||||
2048,
|
2048,
|
||||||
Monolog\Logger::DEBUG,
|
Monolog\Logger::NOTICE,
|
||||||
true,
|
true,
|
||||||
0755
|
0755
|
||||||
],
|
],
|
||||||
|
@ -20,7 +20,7 @@ return [
|
|||||||
'constructor' => [
|
'constructor' => [
|
||||||
'redis-queue',
|
'redis-queue',
|
||||||
7, //$maxFiles
|
7, //$maxFiles
|
||||||
Monolog\Logger::DEBUG,
|
Monolog\Logger::NOTICE,
|
||||||
],
|
],
|
||||||
'formatter' => [
|
'formatter' => [
|
||||||
'class' => Monolog\Formatter\LineFormatter::class,
|
'class' => Monolog\Formatter\LineFormatter::class,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user