diff --git a/best_practices/creating-the-project.rst b/best_practices/creating-the-project.rst index 7aa8236a2d5..5bdfbd08693 100644 --- a/best_practices/creating-the-project.rst +++ b/best_practices/creating-the-project.rst @@ -87,7 +87,7 @@ following: * ``src/AppBundle/``, stores the Symfony specific code (controllers and routes), your domain code (e.g. Doctrine classes) and all your business logic; * ``var/cache/``, stores all the cache files generated by the application; -* ``var/logs/``, stores all the log files generated by the application; +* ``var/log/``, stores all the log files generated by the application; * ``var/sessions/``, stores all the session files generated by the application; * ``tests/AppBundle/``, stores the automatic tests (e.g. Unit tests) of the application. diff --git a/configuration/micro_kernel_trait.rst b/configuration/micro_kernel_trait.rst index 165c4aed5b7..3bceafc99ff 100644 --- a/configuration/micro_kernel_trait.rst +++ b/configuration/micro_kernel_trait.rst @@ -197,7 +197,7 @@ hold the kernel. Now it looks like this:: // optional, to use the standard Symfony logs directory public function getLogDir() { - return __DIR__.'/../var/logs'; + return __DIR__.'/../var/log'; } } diff --git a/configuration/multiple_kernels.rst b/configuration/multiple_kernels.rst index e71c0270a8f..078de65adeb 100644 --- a/configuration/multiple_kernels.rst +++ b/configuration/multiple_kernels.rst @@ -96,7 +96,7 @@ they don't collide with the files from ``AppKernel``:: public function getLogDir() { - return dirname(__DIR__).'/var/logs/api'; + return dirname(__DIR__).'/var/log/api'; } public function registerContainerConfiguration(LoaderInterface $loader) diff --git a/configuration/override_dir_structure.rst b/configuration/override_dir_structure.rst index 809c71244ea..9febff0012e 100644 --- a/configuration/override_dir_structure.rst +++ b/configuration/override_dir_structure.rst @@ -82,11 +82,11 @@ method:: public function getLogDir() { - return dirname(__DIR__).'/var/'.$this->environment.'/logs'; + return dirname(__DIR__).'/var/'.$this->environment.'/log'; } } -Here you have changed the location of the directory to ``var/{environment}/logs``. +Here you have changed the location of the directory to ``var/{environment}/log``. .. _override-templates-dir: diff --git a/deployment/azure-website.rst b/deployment/azure-website.rst index 0c0c0bef337..4c408bedda6 100644 --- a/deployment/azure-website.rst +++ b/deployment/azure-website.rst @@ -255,9 +255,9 @@ directory with at least the following contents: /var/bootstrap.php.cache /var/cache/* /app/config/parameters.yml - /var/logs/* + /var/log/* !var/cache/.gitkeep - !var/logs/.gitkeep + !var/log/.gitkeep /var/SymfonyRequirements.php /build/ /vendor/ diff --git a/deployment/platformsh.rst b/deployment/platformsh.rst index 0cf1c4c54f3..01cc2189a39 100644 --- a/deployment/platformsh.rst +++ b/deployment/platformsh.rst @@ -63,7 +63,7 @@ Platform.sh how to deploy your application (read more about # The mounts that will be performed when the package is deployed. mounts: '/var/cache': 'shared:files/cache' - '/var/logs': 'shared:files/logs' + '/var/log': 'shared:files/log' # The hooks that will be performed when the package is deployed. hooks: diff --git a/logging.rst b/logging.rst index e46398b44de..8b1e2b6b111 100644 --- a/logging.rst +++ b/logging.rst @@ -41,8 +41,8 @@ The configuration for *where* logs are stored lives in the specific :doc:`environment ` configuration files: ``config_dev.yml`` and ``config_prod.yml``. -By default, log entries are written to the ``var/logs/dev.log`` file when you're in -the ``dev`` environment. In the ``prod`` environment, logs are written to ``var/logs/prod.log``, +By default, log entries are written to the ``var/log/dev.log`` file when you're in +the ``dev`` environment. In the ``prod`` environment, logs are written to ``var/log/prod.log``, but *only* during a request where an error or high-priority log entry was made (i.e. ``error()`` , ``critical()``, ``alert()`` or ``emergency()``). @@ -77,7 +77,7 @@ to write logs using the :phpfunction:`syslog` function: # this "file_log" key could be anything file_log: type: stream - # log to var/logs/(environment).log + # log to var/log/(environment).log path: "%kernel.logs_dir%/%kernel.environment%.log" # log *all* messages (debug is lowest level) level: debug diff --git a/page_creation.rst b/page_creation.rst index 9d79b1f537d..06fbdb00df0 100644 --- a/page_creation.rst +++ b/page_creation.rst @@ -179,7 +179,7 @@ So what about the other directories in the project? ``var/`` This is where automatically-created files are stored, like cache files - (``var/cache/``), logs (``var/logs/``) and sessions (``var/sessions/``). + (``var/cache/``), logs (``var/log/``) and sessions (``var/sessions/``). ``vendor/`` Third-party (i.e. "vendor") libraries live here! These are downloaded via the `Composer`_ diff --git a/quick_tour/the_architecture.rst b/quick_tour/the_architecture.rst index 4130cd063ae..ce8c9ccef9a 100644 --- a/quick_tour/the_architecture.rst +++ b/quick_tour/the_architecture.rst @@ -280,7 +280,7 @@ the ``prod`` environment: $ php bin/console cache:clear --env=prod When developing a web application, things can go wrong in many ways. The -log files in the ``var/logs/`` directory tell you everything about the requests +log files in the ``var/log/`` directory tell you everything about the requests and help you fix the problem quickly. Using the Command Line Interface diff --git a/reference/configuration/kernel.rst b/reference/configuration/kernel.rst index a2b4d54da6e..3a0e51fbda3 100644 --- a/reference/configuration/kernel.rst +++ b/reference/configuration/kernel.rst @@ -121,7 +121,7 @@ This returns the path to the cache directory. To change it, override the Log Directory ~~~~~~~~~~~~~ -**type**: ``string`` **default**: ``$this->rootDir/logs`` +**type**: ``string`` **default**: ``$this->rootDir/log`` This returns the path to the log directory. To change it, override the :method:`Symfony\\Component\\HttpKernel\\Kernel::getLogDir` method. Read diff --git a/setup/file_permissions.rst b/setup/file_permissions.rst index 09fc1d3f46e..5c5b8fbb8c7 100644 --- a/setup/file_permissions.rst +++ b/setup/file_permissions.rst @@ -32,7 +32,7 @@ needed permissions: .. code-block:: terminal $ rm -rf var/cache/* - $ rm -rf var/logs/* + $ rm -rf var/log/* $ HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1) $ sudo chmod +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" var diff --git a/setup/new_project_svn.rst b/setup/new_project_svn.rst index 563f8f21250..073d76ca698 100644 --- a/setup/new_project_svn.rst +++ b/setup/new_project_svn.rst @@ -75,18 +75,18 @@ with these steps: .. code-block:: terminal $ cd myproject/ - $ svn add --depth=empty app var var/cache var/logs app/config web + $ svn add --depth=empty app var var/cache var/log app/config web $ svn propset svn:ignore "vendor" . $ svn propset svn:ignore "bootstrap*" var/ $ svn propset svn:ignore "parameters.yml" app/config/ $ svn propset svn:ignore "*" var/cache/ - $ svn propset svn:ignore "*" var/logs/ + $ svn propset svn:ignore "*" var/log/ $ svn propset svn:ignore "*" var/sessions/ $ svn propset svn:ignore "bundles" web - $ svn ci -m "commit basic Symfony ignore list (vendor, var/bootstrap*, app/config/parameters.yml, var/cache/*, var/logs/*, web/bundles)" + $ svn ci -m "commit basic Symfony ignore list (vendor, var/bootstrap*, app/config/parameters.yml, var/cache/*, var/log/*, web/bundles)" #. The rest of the files can now be added and committed to the project: