@@ -22,17 +22,18 @@ Preparing your Application
2222~~~~~~~~~~~~~~~~~~~~~~~~~~
2323
2424Deploying a Symfony2 application to Heroku doesn't require any change in its
25- code, but it requires some minor tweaks in its configuration.
25+ code, but it requires some minor tweaks to its configuration.
2626
2727By default, the Symfony2 app will log into your application's ``app/log/ ``
28- directory, which isn't ideal as Heroku uses an `ephemeral file system `_. On
29- Heroku, the best way to handle logging is using Logplex, and the best way to
30- send log data to Logplex is by writing to ``STDERR `` or ``STDOUT ``. Luckily
31- Symfony2 uses the excellent Monolog library for logging and so a new log
32- destination is just a config file change away.
33-
34- Open ``app/config/config_prod.yml `` file, locate ``monolog/handlers/nested ``
35- section and change the value of ``path `` from
28+ directory. This is not ideal as Heroku uses an `ephemeral file system `_. On
29+ Heroku, the best way to handle logging is using `Logplex `_. And the best way to
30+ send log data to Logplex is by writing to ``STDERR `` or ``STDOUT ``. Luckily,
31+ Symfony2 uses the excellent Monolog library for logging. So, a new log
32+ destination is just a change to a config file away.
33+
34+ Open the ``app/config/config_prod.yml `` file, locate the
35+ ``monolog/handlers/nested `` section (or create it if it doesn't exist yet) and
36+ change the value of ``path `` from
3637``"%kernel.logs_dir%/%kernel.environment%.log" `` to ``"php://stderr" ``:
3738
3839.. code-block :: yaml
@@ -49,7 +50,7 @@ section and change the value of ``path`` from
4950 Once the application is deployed, run ``heroku logs --tail `` to keep the
5051stream of logs from Heroku open in your terminal.
5152
52- Creating a New Application on Heroku
53+ Creating a new Application on Heroku
5354------------------------------------
5455
5556To create a new Heroku application that you can push to, use the CLI ``create ``
@@ -190,4 +191,5 @@ You should be seeing your Symfony2 application in your browser.
190191.. _`Heroku Toolbet` : https://devcenter.heroku.com/articles/getting-started-with-php#local-workstation-setup
191192.. _`getting Started with PHP on Heroku` : .. _`Heroku Toolbet`: https://devcenter.heroku.com/articles/getting-started-with-php
192193.. _`ephemeral file system` : https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem
194+ .. _`Logplex` : https://devcenter.heroku.com/articles/logplex
193195.. _`verified that the RSA key fingerprint is correct` : https://devcenter.heroku.com/articles/git-repository-ssh-fingerprints
0 commit comments