Skip to content

Commit

Permalink
Rename paths of cache and logs for SF 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Quetzacoalt91 committed Jan 15, 2018
1 parent e651445 commit fbb82a9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .t9n.yml
Expand Up @@ -12,8 +12,8 @@ paths:
exclude_files:
- src/PrestaShopBundle/Tests
- classes/PrestaShopAutoload.php
- app/cache/
- app/logs
- var/cache/
- var/logs
- node_modules
- vendor
- tools
Expand Down
2 changes: 1 addition & 1 deletion classes/exception/PrestaShopException.php
Expand Up @@ -152,7 +152,7 @@ protected function displayArgsDebug($args, $id)
protected function logError()
{
$logger = new FileLogger();
$logger->setFilename(_PS_ROOT_DIR_.'/app/logs/'.date('Ymd').'_exception.log');
$logger->setFilename(_PS_ROOT_DIR_.'/var/logs/'.date('Ymd').'_exception.log');
$logger->logError($this->getExtendedMessage(false));
}

Expand Down
4 changes: 2 additions & 2 deletions install-dev/upgrade/upgrade.php
Expand Up @@ -48,7 +48,7 @@
Upgrade::migrateSettingsFile();
require_once(_PS_CONFIG_DIR_.'bootstrap.php');

$logDir = _PS_ROOT_DIR_.'/app/logs/'.(_PS_MODE_DEV_ ? 'dev' : 'prod').'/';
$logDir = _PS_ROOT_DIR_.'/var/logs/'.(_PS_MODE_DEV_ ? 'dev' : 'prod').'/';
@mkdir($logDir, 0777, true);

$upgrade = new Upgrade($logDir, dirname(dirname(__FILE__)).'/');
Expand Down Expand Up @@ -133,7 +133,7 @@ function displayHelp()
PrestaShop upgrade
This script can be called directly and is used by the 1-click upgrade module. It ouputs xml in the first case and json data for the module.
It is mainly used for the database migration of your shop. Logs will be registered in your app/logs/<env> folder.
It is mainly used for the database migration of your shop. Logs will be registered in your var/logs/<env> folder.
------------------
Options
--help Display this message
Expand Down
8 changes: 4 additions & 4 deletions tools/build/Library/ReleaseCreator.php
Expand Up @@ -460,12 +460,12 @@ protected function runComposerInstall()
*/
protected function createAndRenameFolders()
{
if (!file_exists($this->tempProjectPath . '/app/cache/')) {
mkdir($this->tempProjectPath . '/app/cache', 0777, true);
if (!file_exists($this->tempProjectPath . '/var/cache/')) {
mkdir($this->tempProjectPath . '/var/cache', 0777, true);
}

if (!file_exists($this->tempProjectPath . '/app/logs/')) {
mkdir($this->tempProjectPath . '/app/logs', 0777, true);
if (!file_exists($this->tempProjectPath . '/var/logs/')) {
mkdir($this->tempProjectPath . '/var/logs', 0777, true);
}
$itemsToRename = ['admin-dev' => 'admin', 'install-dev' => 'install'];
$basePath = $this->tempProjectPath;
Expand Down
2 changes: 1 addition & 1 deletion tools/build/README.md
Expand Up @@ -33,7 +33,7 @@ This will:
* Export project with git archive to a temp location
* Define constants (`_PS_MODE_DEV_` to false etc...)
* Concatenate all licence files into one unique in {project_root}/LICENCES
* Create somes folders (app/cache, app/logs...)
* Create somes folders (var/cache, var/logs...)
* Clean project files and directories
* Zip release if no --no-zip arg
* Add the installer if no --no-installer arg
Expand Down

0 comments on commit fbb82a9

Please sign in to comment.