Skip to content

Commit 6a0a7d3

Browse files
javiereguiluzweaverryan
authored andcommitted
Applied all the fixes suggested by @xabbuh
1 parent a70d2e0 commit 6a0a7d3

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

cookbook/deployment/heroku.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ Preparing your Application
2222
~~~~~~~~~~~~~~~~~~~~~~~~~~
2323

2424
Deploying 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

2727
By 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
5051
stream 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

5556
To 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

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy