Skip to content

Commit

Permalink
Removed octane specific logging (#30)
Browse files Browse the repository at this point in the history
* Removed octane specific logging

* csfixer
  • Loading branch information
LauJosefsen authored Jun 10, 2024
1 parent f295777 commit af31781
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/FilebeatLogging/FilebeatLoggingServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use JsonException;
use Cego\FilebeatLoggerFactory;
use Monolog\Handler\ProcessHandler;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Debug\ExceptionHandler;
Expand All @@ -30,19 +29,9 @@ public function register(): void
'via' => FilebeatLoggerFactory::class,
];

if($this->isOctane()) {
$config['handler'] = new ProcessHandler('cat >> /proc/1/fd/1');
}

Config::set('logging.channels.filebeat', $config);

/* @phpstan-ignore-next-line */
$this->app->bind(ExceptionHandler::class, LoggerExceptionHandler::class);
}

/** Detect if application is running octane */
protected function isOctane(): bool
{
return isset($_SERVER['LARAVEL_OCTANE']) && ((int)$_SERVER['LARAVEL_OCTANE'] === 1);
}
}

0 comments on commit af31781

Please sign in to comment.