Skip to content

Commit e9539d3

Browse files
committed
changed the logger from zend to monolog
1 parent ebdc728 commit e9539d3

File tree

2 files changed

+36
-25
lines changed

2 files changed

+36
-25
lines changed

book/page_creation.rst

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ of the ``AppKernel`` class:
8282
// ...
8383
new Acme\HelloBundle\AcmeHelloBundle(),
8484
);
85-
85+
8686
// ...
8787
8888
return $bundles;
@@ -418,7 +418,7 @@ use a Kernel class, ``AppKernel``, to bootstrap the application.
418418
Having a front controller means different and more flexible URLs than
419419
are used in a typical flat PHP application. When using a front controller,
420420
URLs are formatted in the following way:
421-
421+
422422
.. code-block:: text
423423
424424
http://localhost/app.php/hello/Ryan
@@ -427,7 +427,7 @@ use a Kernel class, ``AppKernel``, to bootstrap the application.
427427
is routed internally using the routing configuration. By using Apache
428428
``mod_rewrite`` rules, you can force the ``app.php`` file to be executed without
429429
needing to specify it in the URL:
430-
430+
431431
.. code-block:: text
432432
433433
http://localhost/hello/Ryan
@@ -475,12 +475,12 @@ about each of these directories in later chapters.
475475
or ``require`` statements. Instead, Symfony2 uses the namespace of a class
476476
to determine its location and automatically includes the file on your
477477
behalf the instant you need a class::
478-
478+
479479
$loader->registerNamespaces(array(
480480
'Acme' => __DIR__.'/../src',
481481
// ...
482482
));
483-
483+
484484
With this configuration, Symfony2 will look inside the ``src`` directory
485485
for any class in the ``Acme`` namespace (your pretend company's namespace).
486486
For autoloading to work, the class name and path to the file must follow
@@ -712,7 +712,7 @@ format you prefer:
712712
713713
<!-- Twig Configuration -->
714714
<twig:config debug="%kernel.debug%" strict-variables="%kernel.debug%" />
715-
715+
716716
<!-- ... -->
717717
718718
.. code-block:: php
@@ -806,9 +806,9 @@ call the ``prod`` front controller instead:
806806

807807
If you open the ``web/app.php`` file, you'll find that it's configured explicitly
808808
to use the ``prod`` environment::
809-
809+
810810
$kernel = new AppCache(new AppKernel('prod', false));
811-
811+
812812
You can create a new front controller for a new environment by copying
813813
this file and changing ``prod`` to some other value.
814814

@@ -861,10 +861,12 @@ the configuration file for the ``dev`` environment.
861861
toolbar: true
862862
intercept_redirects: true
863863
864-
zend:
865-
logger:
866-
priority: debug
867-
path: %kernel.logs_dir%/%kernel.environment%.log
864+
monolog:
865+
handlers:
866+
main:
867+
type: stream
868+
path: %kernel.logs_dir%/%kernel.environment%.log
869+
level: debug
868870
869871
.. code-block:: xml
870872
@@ -883,9 +885,14 @@ the configuration file for the ``dev`` environment.
883885
intercept-redirects="true"
884886
/>
885887
886-
<zend:config>
887-
<zend:logger priority="info" path="%kernel.logs_dir%/%kernel.environment%.log" />
888-
</zend:config>
888+
<monolog:config>
889+
<monolog:handler
890+
name="main"
891+
type="stream"
892+
path="%kernel.logs_dir%/%kernel.environment%.log"
893+
level="debug"
894+
>
895+
</monolog:config>
889896
890897
.. code-block:: php
891898
@@ -902,12 +909,14 @@ the configuration file for the ``dev`` environment.
902909
'intercept-redirects' => true,
903910
));
904911
905-
$container->loadFromExtension('zend', array(
906-
'logger' => array(
907-
'priority' => 'info',
908-
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
909-
),
910-
));
912+
$container->loadFromExtension('monolog', array(
913+
'handlers' => array(
914+
'main' => array(
915+
'type' => 'stream',
916+
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
917+
'level' => 'debug',
918+
),
919+
)));
911920
912921
The ``imports`` key is similar to a PHP ``include`` statement and guarantees
913922
that the main configuration file (``config.yml``) is loaded first. The rest

quick_tour/the_architecture.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,12 @@ and then modifies it to add some debugging tools:
229229
toolbar: true
230230
intercept_redirects: false
231231
232-
zend:
233-
logger:
234-
priority: debug
235-
path: %kernel.logs_dir%/%kernel.environment%.log
232+
monolog:
233+
handlers:
234+
main:
235+
type: stream
236+
path: %kernel.logs_dir%/%kernel.environment%.log
237+
level: debug
236238
237239
assetic:
238240
use_controller: true

0 commit comments

Comments
 (0)