Skip to content

Commit

Permalink
Added more debugging 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharthesavior committed Sep 14, 2024
1 parent e7c829b commit 9e8d26e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/jacked-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
'log' => [
// @phpstan-ignore-next-line
'stream' => $_ENV['JACKED_SERVER_LOG_PATH'] ?? ROOT_DIR . '/logs/jacked-server.log',
'level' => $_ENV['JACKED_SERVER_LOG_LEVEL'] ?? Level::Warning,
'level' => $_ENV['JACKED_SERVER_LOG_LEVEL'] ?? Level::Warning->value,
],

// ------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions jackit
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ require __DIR__.'/vendor/autoload.php';
use JackedPhp\JackedServer\Commands\RunCommand;
use Symfony\Component\Console\Application;

const ROOT_DIR = __DIR__;
const CONFIG_FILE = "/config/jacked-server.php";
define('IS_PHAR', str_starts_with(__DIR__, 'phar:///'));
define('ROOT_DIR', IS_PHAR ? getcwd() : __DIR__);
define('CONFIG_FILE', __DIR__ . '/config/jacked-server.php');
const MONITOR_CHANNEL = 'jacked-monitor';

$application = new Application;
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private function prepareServerParams(?string $inputPath): ServerParams|false
'port' => (int) Config::get('port'),
'inputFile' => $inputFile,
'documentRoot' => $documentRoot,
'publicDocumentRoot' => Config::get('openswoole-server-settings.document_root'),
'publicDocumentRoot' => $documentRoot,
'logPath' => Config::get('log.stream'),
'logLevel' => (int) Config::get('log.level'),
'fastcgiHost' => Config::get('fastcgi.host'),
Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Config
public static function get(
string $key,
mixed $default = null,
string $configFile = ROOT_DIR . CONFIG_FILE,
string $configFile = CONFIG_FILE,
): mixed {
$configData = require($configFile);

Expand Down

0 comments on commit 9e8d26e

Please sign in to comment.