Output logs from serve in verbose mode #171

This commit is contained in:
Stéphane Goetz 2019-11-26 22:43:12 +01:00
bovenliggende 98acc7323f
commit f62b2bec96
2 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen

Bestand weergeven

@ -37,6 +37,7 @@ class Serve extends DauxCommand
chdir(__DIR__ . '/../../');
putenv('DAUX_VERBOSITY=' . $output->getVerbosity());
putenv('DAUX_SOURCE=' . $daux->getParams()->getDocumentationDirectory());
putenv('DAUX_THEME=' . $daux->getParams()->getThemesPath());
putenv('DAUX_CONFIGURATION=' . $daux->getParams()->getConfigurationOverrideFile());

Bestand weergeven

@ -1,6 +1,6 @@
<?php namespace Todaymade\Daux\Server;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@ -31,7 +31,8 @@ class Server
*/
public static function serve()
{
$output = new NullOutput();
$verbosity = getenv('DAUX_VERBOSITY');
$output = new ConsoleOutput($verbosity);
$daux = new Daux(Daux::LIVE_MODE, $output);
$daux->initializeConfiguration();