Skip to content

Commit 536f2ba

Browse files
chore: change log entry
1 parent 2f04900 commit 536f2ba

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

app/Audit/AuditContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static function fromCurrentRequest(): ?self
8686
userAgent: $req?->userAgent(),
8787
);
8888
} catch (\Exception $e) {
89-
\Illuminate\Support\Facades\Log::warning('Failed to build audit context from request', [
89+
\Illuminate\Support\Facades\Log::warning('AuditContext::fromCurrentRequest Failed to build audit context from request', [
9090
'error' => $e->getMessage()
9191
]);
9292
return null;

app/Listeners/CleanupJobAuditContextListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ private function cleanup(string $jobClass): void
4949
try {
5050
if (app()->bound(AuditContext::CONTAINER_KEY)) {
5151
app()->forgetInstance(AuditContext::CONTAINER_KEY);
52-
Log::debug('CleanupJobAuditContextListener: audit context cleaned after job', [
52+
Log::debug('CleanupJobAuditContextListener::cleanup audit context cleaned after job', [
5353
'job' => $jobClass,
5454
]);
5555
}
5656
} catch (\Exception $e) {
57-
Log::warning('CleanupJobAuditContextListener failed', [
57+
Log::warning('CleanupJobAuditContextListener::cleanup failed', [
5858
'error' => $e->getMessage(),
5959
]);
6060
}

app/Listeners/RestoreJobAuditContextListener.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function handle(JobProcessing $event): void
3838
app()->instance(AuditContext::CONTAINER_KEY, $context);
3939
}
4040
} catch (\Exception $e) {
41-
Log::warning('Failed to restore audit context from queue job', [
41+
Log::warning('RestoreJobAuditContextListener::handle Failed to restore audit context from queue job', [
4242
self::LOG_CONTEXT_KEY => self::LOG_CONTEXT_VALUE,
4343
'exception_message' => $e->getMessage(),
4444
'exception_class' => get_class($e),
@@ -64,7 +64,7 @@ private function extractContextFromPayload(array $payload): ?AuditContext
6464
);
6565

6666
if (!$context instanceof AuditContext) {
67-
Log::warning('Invalid audit context type in job payload', [
67+
Log::warning('RestoreJobAuditContextListener::extractContextFromPayload Invalid audit context type in job payload', [
6868
self::LOG_CONTEXT_KEY => self::LOG_CONTEXT_VALUE,
6969
'actual_type' => gettype($context),
7070
]);
@@ -73,7 +73,7 @@ private function extractContextFromPayload(array $payload): ?AuditContext
7373

7474
return $context;
7575
} catch (\Exception $e) {
76-
Log::warning('Failed to unserialize audit context from job payload', [
76+
Log::warning('RestoreJobAuditContextListener::extractContextFromPayload Failed to unserialize audit context from job payload', [
7777
self::LOG_CONTEXT_KEY => self::LOG_CONTEXT_VALUE,
7878
'exception_message' => $e->getMessage(),
7979
]);

app/Providers/EventServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function boot()
103103
$payload['data']['auditContext'] = serialize($context);
104104
}
105105
} catch (\Exception $e) {
106-
Log::warning('Failed to attach audit context to job', ['error' => $e->getMessage()]);
106+
Log::warning('EventServiceProvider::boot Failed to attach audit context to job', ['error' => $e->getMessage()]);
107107
}
108108
return $payload;
109109
});

0 commit comments

Comments
 (0)