Add Paddle sync log channel
This commit is contained in:
@@ -31,7 +31,9 @@ class PullPackageFromPaddle implements ShouldQueue
|
||||
}
|
||||
|
||||
if (! $package->paddle_product_id && ! $package->paddle_price_id) {
|
||||
Log::warning('Paddle pull skipped for package without linkage', ['package_id' => $package->id]);
|
||||
Log::channel('paddle-sync')->warning('Paddle pull skipped for package without linkage', [
|
||||
'package_id' => $package->id,
|
||||
]);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -52,9 +54,11 @@ class PullPackageFromPaddle implements ShouldQueue
|
||||
'paddle_snapshot' => $snapshot,
|
||||
])->save();
|
||||
|
||||
Log::info('Paddle package pull completed', ['package_id' => $package->id]);
|
||||
Log::channel('paddle-sync')->info('Paddle package pull completed', [
|
||||
'package_id' => $package->id,
|
||||
]);
|
||||
} catch (Throwable $exception) {
|
||||
Log::error('Paddle package pull failed', [
|
||||
Log::channel('paddle-sync')->error('Paddle package pull failed', [
|
||||
'package_id' => $package->id,
|
||||
'message' => $exception->getMessage(),
|
||||
'exception' => $exception,
|
||||
|
||||
@@ -47,7 +47,7 @@ class SyncCouponToPaddle implements ShouldQueue
|
||||
'paddle_last_synced_at' => now(),
|
||||
])->save();
|
||||
} catch (PaddleException $exception) {
|
||||
Log::error('Failed syncing coupon to Paddle', [
|
||||
Log::channel('paddle-sync')->error('Failed syncing coupon to Paddle', [
|
||||
'coupon_id' => $this->coupon->id,
|
||||
'message' => $exception->getMessage(),
|
||||
'status' => $exception->status(),
|
||||
|
||||
@@ -89,7 +89,7 @@ class SyncPackageAddonToPaddle implements ShouldQueue
|
||||
]),
|
||||
])->save();
|
||||
} catch (Throwable $exception) {
|
||||
Log::error('Paddle addon sync failed', [
|
||||
Log::channel('paddle-sync')->error('Paddle addon sync failed', [
|
||||
'addon_id' => $addon->id,
|
||||
'message' => $exception->getMessage(),
|
||||
'exception' => $exception,
|
||||
@@ -160,7 +160,7 @@ class SyncPackageAddonToPaddle implements ShouldQueue
|
||||
]),
|
||||
])->save();
|
||||
|
||||
Log::info('Paddle addon dry-run snapshot generated', [
|
||||
Log::channel('paddle-sync')->info('Paddle addon dry-run snapshot generated', [
|
||||
'addon_id' => $addon->id,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class SyncPackageToPaddle implements ShouldQueue
|
||||
],
|
||||
])->save();
|
||||
} catch (Throwable $exception) {
|
||||
Log::error('Paddle package sync failed', [
|
||||
Log::channel('paddle-sync')->error('Paddle package sync failed', [
|
||||
'package_id' => $package->id,
|
||||
'message' => $exception->getMessage(),
|
||||
'exception' => $exception,
|
||||
@@ -131,7 +131,7 @@ class SyncPackageToPaddle implements ShouldQueue
|
||||
],
|
||||
])->save();
|
||||
|
||||
Log::info('Paddle package dry-run snapshot generated', [
|
||||
Log::channel('paddle-sync')->info('Paddle package dry-run snapshot generated', [
|
||||
'package_id' => $package->id,
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user