Skip to content

Commit afced58

Browse files
committed
refactor: Remove unnecessary logging from various jobs and views
1 parent baa3db0 commit afced58

File tree

6 files changed

+2
-44
lines changed

6 files changed

+2
-44
lines changed

app/Jobs/DatabaseBackupJob.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@ private function backup_standalone_mongodb(string $databaseWithCollections): voi
472472
throw new \Exception('MongoDB credentials not found. Ensure MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD environment variables are available in the container.');
473473
}
474474
}
475-
\Log::info('MongoDB backup URL configured', ['has_url' => filled($url), 'using_env_vars' => blank($this->database->internal_db_url)]);
476475
if ($databaseWithCollections === 'all') {
477476
$commands[] = 'mkdir -p '.$this->backup_dir;
478477
if (str($this->database->image)->startsWith('mongo:4')) {

app/Jobs/ValidateAndInstallServerJob.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ public function handle(): void
3535
// Mark validation as in progress
3636
$this->server->update(['is_validating' => true]);
3737

38-
Log::info('ValidateAndInstallServer: Starting validation', [
39-
'server_id' => $this->server->id,
40-
'server_name' => $this->server->name,
41-
'attempt' => $this->numberOfTries + 1,
42-
]);
43-
4438
// Validate connection
4539
['uptime' => $uptime, 'error' => $error] = $this->server->validateConnection();
4640
if (! $uptime) {
@@ -92,13 +86,6 @@ public function handle(): void
9286
return;
9387
}
9488

95-
Log::info('ValidateAndInstallServer: Installing prerequisites', [
96-
'server_id' => $this->server->id,
97-
'attempt' => $this->numberOfTries + 1,
98-
'missing_commands' => $validationResult['missing'],
99-
'found_commands' => $validationResult['found'],
100-
]);
101-
10289
// Install prerequisites
10390
$this->server->installPrerequisites();
10491

@@ -128,11 +115,6 @@ public function handle(): void
128115
return;
129116
}
130117

131-
Log::info('ValidateAndInstallServer: Installing Docker', [
132-
'server_id' => $this->server->id,
133-
'attempt' => $this->numberOfTries + 1,
134-
]);
135-
136118
// Install Docker
137119
$this->server->installDocker();
138120

@@ -158,12 +140,6 @@ public function handle(): void
158140
return;
159141
}
160142

161-
// Validation successful!
162-
Log::info('ValidateAndInstallServer: Validation successful', [
163-
'server_id' => $this->server->id,
164-
'server_name' => $this->server->name,
165-
]);
166-
167143
// Start proxy if needed
168144
if (! $this->server->isBuildServer()) {
169145
$proxyShouldRun = CheckProxy::run($this->server, true);

app/Notifications/Dto/PushoverMessage.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace App\Notifications\Dto;
44

5-
use Illuminate\Support\Facades\Log;
6-
75
class PushoverMessage
86
{
97
public function __construct(
@@ -43,8 +41,6 @@ public function toPayload(string $token, string $user): array
4341
$payload['message'] .= "&nbsp;<a href='".$buttonUrl."'>".$text.'</a>';
4442
}
4543

46-
Log::info('Pushover message', $payload);
47-
4844
return $payload;
4945
}
5046
}

bootstrap/helpers/shared.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,8 +2912,6 @@ function getHelperVersion(): string
29122912

29132913
function loadConfigFromGit(string $repository, string $branch, string $base_directory, int $server_id, int $team_id): ?array
29142914
{
2915-
Log::info("coolify.json: Starting detection for {$repository} branch {$branch} base_dir {$base_directory}");
2916-
29172915
$server = Server::where('id', $server_id)->where('team_id', $team_id)->first();
29182916
if (! $server) {
29192917
Log::warning("coolify.json: Server not found - server_id: {$server_id}, team_id: {$team_id}");
@@ -2932,8 +2930,6 @@ function loadConfigFromGit(string $repository, string $branch, string $base_dire
29322930
}
29332931
$pathsToCheck[] = 'coolify.json';
29342932

2935-
Log::info('coolify.json: Checking paths - '.implode(', ', $pathsToCheck));
2936-
29372933
// Build sparse-checkout file list
29382934
$fileList = collect($pathsToCheck)->map(fn ($path) => "./{$path}")->implode(' ');
29392935

@@ -2956,11 +2952,7 @@ function loadConfigFromGit(string $repository, string $branch, string $base_dire
29562952
try {
29572953
$output = instant_remote_process($commands, $server);
29582954

2959-
Log::info('coolify.json: Raw output length - '.strlen($output ?? ''));
2960-
29612955
if (empty($output)) {
2962-
Log::info('coolify.json: No output from remote process');
2963-
29642956
return null;
29652957
}
29662958

@@ -2984,11 +2976,6 @@ function loadConfigFromGit(string $repository, string $branch, string $base_dire
29842976
// Warn about unknown top-level fields
29852977
$knownFields = ['version', 'name', 'description', 'build', 'domains', 'environment_variables', 'health_check', 'limits', 'settings'];
29862978
$unknownFields = array_diff(array_keys($config), $knownFields);
2987-
if (! empty($unknownFields)) {
2988-
Log::info('coolify.json: Unknown fields detected (will be ignored) - '.implode(', ', $unknownFields));
2989-
}
2990-
2991-
Log::info('coolify.json: Successfully loaded config with keys - '.implode(', ', array_keys($config)));
29922979

29932980
return $config;
29942981
} catch (\Exception $e) {

resources/views/livewire/project/new/coolify-json-import.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div class="pb-2 text-red-500">{{ $parseError }}</div>
1515
@endif
1616

17-
<x-forms.textarea useMonacoEditor monacoEditorLanguage="json" monacoJsonSchema="/schemas/coolify.schema.json"
17+
<x-forms.textarea useMonacoEditor monacoEditorLanguage="json"
1818
rows="20" id="coolifyJson" autofocus wire:model.live.debounce.500ms="coolifyJson"
1919
placeholder='{
2020
"version": "1.0",

resources/views/livewire/project/shared/upload-config.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<form wire:submit="uploadConfig" class="flex flex-col gap-2 w-full">
2-
<x-forms.textarea id="config" monacoEditorLanguage="json" monacoJsonSchema="/schemas/coolify.schema.json"
2+
<x-forms.textarea id="config" monacoEditorLanguage="json"
33
useMonacoEditor />
44
<x-forms.button type="submit">
55
Upload

0 commit comments

Comments
 (0)