You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Before continue, we check that the output file is valid and writable (except for gaufrette)if (false !== $this->logPath && strpos($this->logPath, 'gaufrette:') !== 0) {
// Create folder if it does not exist yet.// TODO: maybe pass in folder permission and set "0744" (or s.th. else) as fallback.if (false === is_dir($this->logPath) && false === mkdir($this->logPath, 0744, true) {
$output->writeln(
'<error>Cannot create folder "'.$this->logPath.'". Please change your `log_path` in config.yml'.'</error>'
);
return;
}
if (false === is_writable($this->logPath)) {
$output->writeln(
'<error>'.$this->logPath.
' not found or not writable. You should override `log_path` in your config.yml'.'</error>'
);
return;
}
}
The text was updated successfully, but these errors were encountered:
Hi,
I configured a log path in my SF2 which does not exist yet (
app/logs/scheduler
). How about extending the code to try to create the folder first and then check if it's writable (https://github.com/J-Mose/CommandSchedulerBundle/blob/master/Command/ExecuteCommand.php#L95).Example:
The text was updated successfully, but these errors were encountered: