Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

chore: remove verbose Log::info from all publishers

Paulo Castellano288379344189
diff --git a/app/Services/Social/BlueskyPublisher.php b/app/Services/Social/BlueskyPublisher.php
index add9fdc87..418954973 100644
--- a/app/Services/Social/BlueskyPublisher.php
+++ b/app/Services/Social/BlueskyPublisher.php
@@ -72,12 +72,6 @@ class BlueskyPublisher
$record['facets'] = $facets;
}
- Log::info('Bluesky publishing post', [
- 'user_id' => $account->platform_user_id,
- 'has_embed' => $embed !== null,
- 'facet_count' => count($facets),
- ]);
-
$response = Http::withToken($account->access_token)
->post("{$service}/xrpc/com.atproto.repo.createRecord", [
'repo' => $account->platform_user_id,
@@ -100,11 +94,6 @@ class BlueskyPublisher
$uri = data_get($data, 'uri');
$postId = basename($uri);
- Log::info('Bluesky post created successfully', [
- 'uri' => $uri,
- 'post_id' => $postId,
- ]);
-
return [
'id' => $postId,
'url' => $this->buildPostUrl($account->username, $postId),
@@ -272,8 +261,6 @@ class BlueskyPublisher
{
$service = $account->meta['service'] ?? 'https://bsky.social';
- Log::info('Bluesky refreshing token', ['user_id' => $account->platform_user_id]);
-
// Try refresh first
$response = Http::withToken($account->refresh_token)
->post("{$service}/xrpc/com.atproto.server.refreshSession");
@@ -286,8 +273,6 @@ class BlueskyPublisher
'token_expires_at' => now()->addHours(2),
]);
- Log::info('Bluesky token refreshed via refresh token');
-
return;
}
@@ -315,8 +300,6 @@ class BlueskyPublisher
'token_expires_at' => now()->addHours(2),
]);
- Log::info('Bluesky token refreshed via re-authentication');
-
return;
}
} catch (\Exception $e) {
diff --git a/app/Services/Social/LinkedInTokenSynchronizer.php b/app/Services/Social/LinkedInTokenSynchronizer.php
index 61146cb00..5a20de65e 100644
--- a/app/Services/Social/LinkedInTokenSynchronizer.php
+++ b/app/Services/Social/LinkedInTokenSynchronizer.php
@@ -7,7 +7,6 @@ namespace App\Services\Social;
use App\Enums\SocialAccount\Platform;
use App\Models\SocialAccount;
use App\Models\Workspace;
-use Illuminate\Support\Facades\Log;
class LinkedInTokenSynchronizer
{
@@ -30,13 +29,6 @@ class LinkedInTokenSynchronizer
return;
}
- Log::info('Syncing LinkedIn tokens between accounts', [
- 'source_id' => $sourceAccount->id,
- 'source_platform' => $sourceAccount->platform->value,
- 'target_id' => $targetAccount->id,
- 'target_platform' => $targetAccount->platform->value,
- ]);
-
$targetAccount->update([
'access_token' => $sourceAccount->access_token,
'refresh_token' => $sourceAccount->refresh_token,
diff --git a/app/Services/Social/MastodonPublisher.php b/app/Services/Social/MastodonPublisher.php
index 179b7c062..073a3e4fb 100644
--- a/app/Services/Social/MastodonPublisher.php
+++ b/app/Services/Social/MastodonPublisher.php
@@ -41,12 +41,6 @@ class MastodonPublisher
$payload['media_ids'] = $mediaIds;
}
- Log::info('Mastodon publishing status', [
- 'instance' => $instance,
- 'user_id' => $account->platform_user_id,
- 'has_media' => count($mediaIds) > 0,
- ]);
-
$response = Http::withToken($account->access_token)
->post("{$instance}/api/v1/statuses", $payload);
@@ -60,11 +54,6 @@ class MastodonPublisher
$data = $response->json();
- Log::info('Mastodon post created', [
- 'id' => data_get($data, 'id'),
- 'url' => data_get($data, 'url'),
- ]);
-
return [
'id' => data_get($data, 'id'),
'url' => data_get($data, 'url'),
@@ -113,8 +102,6 @@ class MastodonPublisher
$data = $response->json();
- Log::info('Mastodon media uploaded', ['id' => data_get($data, 'id')]);
-
return data_get($data, 'id');
} catch (\Exception $e) {
Log::error('Mastodon media upload error', [
diff --git a/app/Services/Social/PinterestPublisher.php b/app/Services/Social/PinterestPublisher.php
index 27468ff4d..28f7e97cb 100644
--- a/app/Services/Social/PinterestPublisher.php
+++ b/app/Services/Social/PinterestPublisher.php
@@ -50,12 +50,6 @@ class PinterestPublisher
throw new \Exception('Pinterest board_id is required');
}
- Log::info('Pinterest publishing image pin', [
- 'user_id' => $account->platform_user_id,
- 'board_id' => $boardId,
- 'image_url' => $media->url,
- ]);
-
// Download and optimize image
$tempFile = tempnam(sys_get_temp_dir(), 'pin_image_');
@@ -113,8 +107,6 @@ class PinterestPublisher
$data = $response->json();
- Log::info('Pinterest pin created successfully', ['pin_id' => data_get($data, 'id')]);
-
return [
'id' => data_get($data, 'id'),
'url' => 'https://pinterest.com/pin/'.data_get($data, 'id'),
@@ -136,11 +128,6 @@ class PinterestPublisher
throw new \Exception('Pinterest board_id is required');
}
- Log::info('Pinterest publishing video pin', [
- 'user_id' => $account->platform_user_id,
- 'board_id' => $boardId,
- ]);
-
// Step 1: Register media upload
$registerResponse = Http::withToken($account->access_token)
->post(self::API_BASE.'/media', [
@@ -158,8 +145,6 @@ class PinterestPublisher
$registerData = $registerResponse->json();
$mediaId = $registerData['media_id'];
- Log::info('Pinterest media registered', ['media_id' => $mediaId]);
-
// Step 2: Upload video to S3
$uploadParams = $registerData['upload_parameters'] ?? [];
$uploadUrl = $registerData['upload_url'] ?? null;
@@ -208,8 +193,6 @@ class PinterestPublisher
throw new \Exception('Pinterest video upload failed');
}
- Log::info('Pinterest video uploaded');
-
// Step 3: Wait for processing
$this->waitForMediaProcessing($account, $mediaId);
@@ -251,8 +234,6 @@ class PinterestPublisher
$data = $response->json();
- Log::info('Pinterest video pin created successfully', ['pin_id' => data_get($data, 'id')]);
-
return [
'id' => data_get($data, 'id'),
'url' => 'https://pinterest.com/pin/'.data_get($data, 'id'),
@@ -274,12 +255,6 @@ class PinterestPublisher
throw new \Exception('Pinterest board_id is required');
}
- Log::info('Pinterest publishing carousel', [
- 'user_id' => $account->platform_user_id,
- 'board_id' => $boardId,
- 'image_count' => $medias->count(),
- ]);
-
$items = $medias->map(fn ($media) => [
'url' => $media->url,
])->toArray();
@@ -317,8 +292,6 @@ class PinterestPublisher
$data = $response->json();
- Log::info('Pinterest carousel created successfully', ['pin_id' => data_get($data, 'id')]);
-
return [
'id' => data_get($data, 'id'),
'url' => 'https://pinterest.com/pin/'.data_get($data, 'id'),
@@ -345,12 +318,6 @@ class PinterestPublisher
$data = $response->json();
$status = data_get($data, 'status', 'unknown');
- Log::info('Pinterest media processing status', [
- 'media_id' => $mediaId,
- 'status' => $status,
- 'attempt' => $i,
- ]);
-
if ($status === 'succeeded') {
return;
}
@@ -368,8 +335,6 @@ class PinterestPublisher
public function refreshToken(SocialAccount $account): void
{
- Log::info('Pinterest refreshing token', ['user_id' => $account->platform_user_id]);
-
$response = Http::asForm()
->withBasicAuth(
config('services.pinterest.client_id'),
@@ -392,8 +357,6 @@ class PinterestPublisher
'refresh_token' => data_get($data, 'refresh_token', $account->refresh_token),
'token_expires_at' => data_get($data, 'expires_in') ? now()->addSeconds(data_get($data, 'expires_in')) : now()->addDays(30),
]);
-
- Log::info('Pinterest token refreshed successfully');
}
/**
diff --git a/app/Services/Social/ThreadsPublisher.php b/app/Services/Social/ThreadsPublisher.php
index 2105c525a..ada9eb2f7 100644
--- a/app/Services/Social/ThreadsPublisher.php
+++ b/app/Services/Social/ThreadsPublisher.php
@@ -97,8 +97,6 @@ class ThreadsPublisher
$containerId = $containerResponse->json()['id'];
- Log::info('Threads image container created', ['container_id' => $containerId]);
-
// Step 2: Wait for image processing
$this->waitForMediaProcessing($containerId, $accessToken);
@@ -108,8 +106,6 @@ class ThreadsPublisher
private function publishVideoPost(string $userId, string $accessToken, ?string $content, $media): array
{
- Log::info('Threads publishing video post', ['user_id' => $userId]);
-
// Step 1: Create container
$containerResponse = Http::post("{$this->baseUrl}/{$userId}/threads", [
'media_type' => 'VIDEO',
@@ -137,11 +133,6 @@ class ThreadsPublisher
private function publishCarousel(string $userId, string $accessToken, ?string $content, $mediaCollection): array
{
- Log::info('Threads publishing carousel', [
- 'user_id' => $userId,
- 'media_count' => $mediaCollection->count(),
- ]);
-
// Step 1: Create containers for each media item
$childContainers = [];
@@ -229,8 +220,6 @@ class ThreadsPublisher
$permalink = $permalinkResponse->json()['permalink'] ?? null;
- Log::info('Threads publish success', ['media_id' => $mediaId, 'permalink' => $permalink]);
-
return [
'id' => $mediaId,
'url' => $permalink,
@@ -259,13 +248,6 @@ class ThreadsPublisher
$data = $statusResponse->json();
$status = data_get($data, 'status', 'UNKNOWN');
- Log::info('Threads media processing status', [
- 'container_id' => $containerId,
- 'status' => $status,
- 'attempt' => $i,
- 'response' => $data,
- ]);
-
if ($status === 'FINISHED') {
return;
}
@@ -304,8 +286,6 @@ class ThreadsPublisher
'refresh_token' => $newToken,
'token_expires_at' => data_get($data, 'expires_in') ? now()->addSeconds(data_get($data, 'expires_in')) : null,
]);
-
- Log::info('Threads token refreshed successfully');
}
private function handleApiError(Response $response): never