diff --git a/src/Framework/Logging/Handlers/DockerJsonHandler.php b/src/Framework/Logging/Handlers/DockerJsonHandler.php index 1b7b27f7..b18f42de 100644 --- a/src/Framework/Logging/Handlers/DockerJsonHandler.php +++ b/src/Framework/Logging/Handlers/DockerJsonHandler.php @@ -5,9 +5,9 @@ declare(strict_types=1); namespace App\Framework\Logging\Handlers; use App\Framework\Config\Environment; -use App\Framework\Logging\FormattableHandler; use App\Framework\Logging\Formatter\JsonFormatter; use App\Framework\Logging\Formatter\LogFormatter; +use App\Framework\Logging\LogHandler; use App\Framework\Logging\LogLevel; use App\Framework\Logging\LogRecord; use App\Framework\Logging\Security\SensitiveDataRedactor; @@ -34,7 +34,7 @@ use App\Framework\Logging\Security\SensitiveDataRedactor; * - docker logs 2>&1 | jq 'select(.level == "ERROR")' * - docker logs 2>&1 | jq -r '[.timestamp, .level, .message] | @tsv' */ -final readonly class DockerJsonHandler implements FormattableHandler +final readonly class DockerJsonHandler implements LogHandler { private JsonFormatter $formatter; private LogLevel $minLevel; diff --git a/src/Framework/Logging/LogConfig.php b/src/Framework/Logging/LogConfig.php index 51931cf0..fe2b63a2 100644 --- a/src/Framework/Logging/LogConfig.php +++ b/src/Framework/Logging/LogConfig.php @@ -29,7 +29,7 @@ final class LogConfig $this->pathProvider = $pathProvider; // Basis-Logverzeichnis (storage/logs für moderne PHP Framework Convention) - $logBasePath = 'storage/logs'; + $logBasePath = 'logs'; // Standard-Logpfade definieren $this->logPaths = [ @@ -38,8 +38,8 @@ final class LogConfig 'error' => $this->resolvePath($logBasePath . '/app/error.log'), // Systemlogs - 'nginx_access' => '/var/log/nginx/access.log', - 'nginx_error' => '/var/log/nginx/error.log', + #'nginx_access' => '/var/log/nginx/access.log', + #'nginx_error' => '/var/log/nginx/error.log', // Sicherheitslogs 'security' => $this->resolvePath($logBasePath . '/security/security.log'), diff --git a/src/Framework/Logging/LoggerInitializer.php b/src/Framework/Logging/LoggerInitializer.php index 97f19929..3b04d256 100644 --- a/src/Framework/Logging/LoggerInitializer.php +++ b/src/Framework/Logging/LoggerInitializer.php @@ -90,7 +90,7 @@ final readonly class LoggerInitializer // Globalen Kontext mit App-Informationen initialisieren $contextManager->addGlobalData('app_version', $config->app->version); - $contextManager->addGlobalData('environment', $config->app->environment->value); + $contextManager->addGlobalData('environment', $config->app->type->value); $contextManager->addGlobalTags('application', 'framework'); } }