Compare commits
9 Commits
0.1.8
...
production
Author | SHA1 | Date |
---|---|---|
|
ddb84917b5 | 5 months ago |
|
730aa08b87 | 6 months ago |
|
00472d7ac1 | 6 months ago |
|
6218053a9a | 2 years ago |
|
554b985b7d | 2 years ago |
|
49967bf8f7 | 2 years ago |
|
834c8bc178 | 2 years ago |
|
4e876045da | 2 years ago |
|
eea473fdaa | 2 years ago |
@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Ae3\LaravelLogsLayer\app\Services;
|
||||||
|
|
||||||
|
use Ae3\LaravelLogsLayer\app\DataTransferObjects\ExceptionContextDTO;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
|
class RabbitMQLogService extends AbstractLogService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
protected function getLogChannel(): string
|
||||||
|
{
|
||||||
|
return 'rabbitmq';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
protected function buildLogData(string $caller, Throwable $exception, ExceptionContextDTO $contextDto): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'caller' => $caller,
|
||||||
|
'status_code' => $exception->getCode(),
|
||||||
|
'line' => $exception->getLine(),
|
||||||
|
'file' => $exception->getFile(),
|
||||||
|
'error_code' => $contextDto->code,
|
||||||
|
'custom_data' => $this->asPrettyJson($contextDto->custom_data),
|
||||||
|
'tags' => $contextDto->tags,
|
||||||
|
'exception' => get_class($exception),
|
||||||
|
'current_url' => $contextDto->current_url,
|
||||||
|
'current_user' => $this->asPrettyJson($contextDto->current_user),
|
||||||
|
'classes' => $this->asPrettyJson($this->getContextClasses($exception->getTrace(), $contextDto->root_namespace)),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue