feat: log drainer container check

This commit is contained in:
Andras Bacsai
2023-11-17 21:16:25 +01:00
parent 3b20eee909
commit 689480003a
12 changed files with 140 additions and 47 deletions

View File

@@ -8,8 +8,17 @@ use App\Models\Server;
class InstallLogDrain
{
use AsAction;
public function handle(Server $server, string $type)
public function handle(Server $server)
{
if ($server->settings->is_logdrain_newrelic_enabled) {
$type = 'newrelic';
} else if ($server->settings->is_logdrain_highlight_enabled) {
$type = 'highlight';
} else if ($server->settings->is_logdrain_axiom_enabled) {
$type = 'axiom';
} else {
$type = 'none';
}
try {
if ($type === 'none') {
$command = [