Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -16,13 +16,10 @@ use App\Framework\Database\EntityManager;
use App\Framework\DateTime\Clock;
use App\Framework\DateTime\DateTimeFormatter;
use App\Framework\DI\DefaultContainer;
use App\Framework\Exception\FrameworkException;
use App\Framework\Http\IpAddress;
use App\Framework\Http\Request;
use App\Framework\Http\Session\Session;
use App\Framework\Http\Session\SessionInterface;
use App\Framework\HttpClient\CurlHttpClient;
use App\Framework\Markdown\MarkdownConverter;
use App\Framework\Meta\Keywords;
use App\Framework\Meta\MetaData;
use App\Framework\Meta\StaticPageMetaResolver;
use App\Framework\QueryBus\QueryBus;
@@ -30,14 +27,10 @@ use App\Framework\Router\Result\ViewResult;
use App\Framework\Router\UrlGenerator;
use App\Framework\SyntaxHighlighter\FileHighlighter;
use App\Framework\SyntaxHighlighter\SyntaxHighlighter;
use App\Framework\View\Engine;
use App\Framework\View\RenderContext;
use App\Framework\View\TemplateRenderer;
use App\Infrastructure\AI\AiHandlerFactory;
use App\Infrastructure\AI\AiService;
use App\Infrastructure\GeoIp\DatabaseSetup;
use App\Infrastructure\GeoIp\GeoIp;
use SplFileObject;
final readonly class ShowHome
{
@@ -50,10 +43,10 @@ final readonly class ShowHome
private Cache $cache,
private ConnectionInterface $connection,
private PathProvider $pathProvider,
private Session $session,
private UrlGenerator $urlGenerator,
private ImageRepository $imageRepository,
) {}
) {
}
#[Route(path: '/', name: 'home')]
public function home(HomeRequest $request, string $test = 'hallo'): ViewResult
@@ -62,6 +55,8 @@ final readonly class ShowHome
/*$image = $this->imageRepository->findBySlotName('slot1');
$filepath = $image->filename;
echo "<img src='/images/{$filepath}' alt='AltText' style='width: 400px; object-fit: cover; aspect-ratio: 1; border-radius: 10px;'/>";*/
@@ -137,32 +132,35 @@ final readonly class ShowHome
/* $status = opcache_get_status(true);
unset($status['scripts']);
/* $status = opcache_get_status(true);
unset($status['scripts']);
$response = $aiService->query('Bitte visualisiere mir den OPCache Status kompakt: '.print_r($status, true), AiModel::OLLAMA_QWEN2_5);
$response = $aiService->query('Bitte visualisiere mir den OPCache Status kompakt: '.print_r($status, true), AiModel::OLLAMA_QWEN2_5);
$response = $aiService->query('Du wirst in meinem PHP Framework ausgeführt. Kann ich dir Frameworkdaten irgendwie zugänglich machen?', AiModel::OLLAMA_QWEN2_5, messages: [
['role' => 'system', 'content' => 'Du bist ein hilfreicher Programmier-Assistent.'],
['role' => 'user', 'content' => 'Du wirst in meinem PHP Framework ausgeführt. Kann ich dir Frameworkdaten irgendwie zugänglich machen?'],
['role' => 'user', 'content' => ''],
]);
$response = $aiService->query('Du wirst in meinem PHP Framework ausgeführt. Kann ich dir Frameworkdaten irgendwie zugänglich machen?', AiModel::OLLAMA_QWEN2_5, messages: [
['role' => 'system', 'content' => 'Du bist ein hilfreicher Programmier-Assistent.'],
['role' => 'user', 'content' => 'Du wirst in meinem PHP Framework ausgeführt. Kann ich dir Frameworkdaten irgendwie zugänglich machen?'],
['role' => 'user', 'content' => ''],
]);
$html = new MarkdownConverter()->toHtml($response->content);
$html = new MarkdownConverter()->toHtml($response->content);
echo $html;*/
echo $html;*/
if($this->session->validation->has('form', 'consent')) {
// Get session from container (available after SessionMiddleware runs)
if ($this->container->has(SessionInterface::class)) {
$session = $this->container->get(SessionInterface::class);
#debug($this->session->form->get('form'));
#debug($this->session->validation->getField('form', 'consent'));
$this->session->validation->clearAll();
if ($session->validation->has('form', 'consent')) {
#debug($session->form->get('form'));
#debug($session->validation->getField('form', 'consent'));
// Only clear the specific form, not all forms
$session->validation->clear('form');
$session->form->clear('form');
}
}
@@ -178,7 +176,7 @@ final readonly class ShowHome
#var_dump('All Attribute Results:', $results->getAllAttributeResults());
#var_dump('Processed File Count:', $discovery->getProcessedFileCount());
// Teste ob ShowHome gefunden wird
// Teste ob ShowHome gefunden wird
$basePath = $this->pathProvider->getBasePath();
#debug('Scanning path:', $basePath . '/src');