Permalink
Browse files

Move app/logs to var/logs

  • Loading branch information...
carakas committed Jul 27, 2017
1 parent 517fbd8 commit d439ac2d24be7be735f5ebea7b60ca4d60838b09
@@ -14,7 +14,7 @@
.*.swp
.DS_Store
/app/cache/*
/app/logs/*
/var/logs/*
/app/sessions/*
/bin/*
!bin/console
@@ -61,7 +61,7 @@ deny from env=stayout
RewriteRule composer\.lock - [F]
RewriteRule phpunit\.xml\.dist - [F]
RewriteRule .*\.md - [F]
RewriteRule app/logs - [F]
RewriteRule var/logs - [F]
RewriteRule app/config - [F]
RewriteRule src/Frontend/Cache/CompiledTemplates - [F]
RewriteRule src/Frontend/Cache/Search - [F]
@@ -21,6 +21,6 @@ after_success:
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

after_failure:
- cat app/logs/test.log
- cat var/logs/test.log

sudo: false
@@ -81,8 +81,8 @@ For Nginx
server_name fork-cms.com;
root /var/www/fork;
index index.php;
error_log /var/www/fork/app/logs/error-nginx.log;
access_log /var/www/fork/app/logs/access-nginx.log;
error_log /var/www/fork/var/logs/error-nginx.log;
access_log /var/www/fork/var/logs/access-nginx.log;

#site root is redirected to the app boot script
location = / {
@@ -565,3 +565,7 @@ If you want to add a global anyway you should use assignGlobal as it uses a cust
### Console

Moved `app/console` to `bin/console`

### Logs

Moved `app/logs` to `var/logs`
@@ -221,4 +221,9 @@ protected function initializeContainer(): void
parent::initializeContainer();
}
public function getLogDir(): string
{
return dirname(__DIR__).'/var/logs/' . $this->environment;
}
}
@@ -42,7 +42,7 @@ monolog:
handlers:
main:
type: stream
path: "%site.path_www%/app/logs/%kernel.environment%.log"
path: "%site.path_www%/var/logs/%kernel.environment%.log"
level: error
# swift:
# type: swift_mailer
@@ -11,7 +11,7 @@ monolog:
handlers:
main:
type: stream
path: "%site.path_www%/app/logs/%kernel.environment%.log"
path: "%site.path_www%/var/logs/%kernel.environment%.log"
level: debug

services:
@@ -29,7 +29,7 @@ monolog:
handlers:
main:
type: stream
path: %site.path_www%/app/logs/logs.log
path: %site.path_www%/var/logs/logs.log
level: debug

parameters:
@@ -261,7 +261,7 @@
</p>
</div>
<div class="list-group-item list-group-item-{{ checker.errors.fileSystemAppLogs }}">
<h4 class="list-group-item-heading">{{ rootDir }}/app/logs/</h4>
<h4 class="list-group-item-heading">{{ rootDir }}/var/logs/</h4>
<p class="list-group-item-text">
In this location the global logs will be stored.
</p>
@@ -243,7 +243,7 @@ protected function checkFilePermissions(): void
);
$this->checkRequirement(
'fileSystemAppLogs',
$this->isRecursivelyWritable($this->rootDir . 'app/logs/'),
$this->isRecursivelyWritable($this->rootDir . 'var/logs/'),
self::STATUS_ERROR
);
$this->checkRequirement(

0 comments on commit d439ac2

Please sign in to comment.