Skip to content

Commit

Permalink
ProfilerStorage configuration
Browse files Browse the repository at this point in the history
The ProfilerStorage other than FileProfilerStorage have been removed in this PR : symfony/symfony#16018
  • Loading branch information
xavierleune committed Dec 16, 2015
1 parent 3ad7f26 commit 32a63d8
Showing 1 changed file with 2 additions and 62 deletions.
64 changes: 2 additions & 62 deletions cookbook/profiler/storage.rst
Expand Up @@ -5,65 +5,5 @@ Switching the Profiler Storage
==============================

By default the profile stores the collected data in files in the ``%kernel.cache_dir%/profiler/`` directory.
You can control the storage being used through the ``dsn``, ``username``,
``password`` and ``lifetime`` options. For example, the following configuration
uses MySQL as the storage for the profiler with a lifetime of one hour:

.. configuration-block::

.. code-block:: yaml
# app/config/config.yml
framework:
profiler:
dsn: 'mysql:host=localhost;dbname=%database_name%'
username: '%database_user%'
password: '%database_password%'
lifetime: 3600
.. code-block:: xml
<!-- app/config/config.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd"
>
<framework:config>
<framework:profiler
dsn="mysql:host=localhost;dbname=%database_name%"
username="%database_user%"
password="%database_password%"
lifetime="3600"
/>
</framework:config>
</container>
.. code-block:: php
// app/config/config.php
// ...
$container->loadFromExtension('framework', array(
'profiler' => array(
'dsn' => 'mysql:host=localhost;dbname=%database_name%',
'username' => '%database_user',
'password' => '%database_password%',
'lifetime' => 3600,
),
));
The :doc:`HttpKernel component </components/http_kernel/introduction>` currently
supports the following profiler storage drivers:

* file
* sqlite
* mysql
* mongodb
* memcache
* memcached
* redis
You can control the storage by implementing the ``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` in
your own service and override the ``profiler.storage`` service.

0 comments on commit 32a63d8

Please sign in to comment.