enableDebugger shows no error when logDirectory not present
- OndrejSlamecka
- Member | 41
Throws Nette\DirectoryNotFoundException
for me. Please post your
app/bootstrap.php
file.
And here's the API,
it may help you a bit.
Last edited by OndrejSlamecka (2012-03-11 12:48)
- vkrishn
- Member | 9
I was wondering if following approach would work,
$configurator->setLogDirectory(__DIR__ . '/../log');
$configurator->enableDebugger(true);
then,
$configurator->createRobotLoader()
->addDirectory(__DIR__)
->register();
would also check for setting logdirectory and show errors using blue
screen.
Setting of log dir should be seperate from its usage.
- duke
- Member | 650
Theoretically it could be possible to change Nette so that it first enables
the the blue-screen and only later configures the logger, but all we would
achieve by this would be that we would be able to blue-screen-display this one
particular error. I don't think it's such a big deal that there is a single
case that won't get blue-screen-displayed. The change would probably involve
splitting Debugger::enable
into 2 separate methods:
Debugger::enableBlueScreen
and Debugger::setupLogger
and making Configurator
call these in enableDebugger
method.
Robot loader has nothing to do with this. Robot loader provides the autoloading of php files, not debugging services.
- vkrishn
- Member | 9
There could be a general directory create/permission check method.
$configurator->setDirectory(__DIR__ . '/../temp', 'temp'); //second param being the reference label/tag
$configurator->setDirectory(__DIR__ . '/../log' 'log');
This method should check for:
- Dir if exist
- The required permission is correct.
- Else make dir with right permission.
On error setting/displaying message at each level.