Message-ID: <2014679019.3334.1485852749725.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3333_220609495.1485852749724" ------=_Part_3333_220609495.1485852749724 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Logging & Debug configuration

Logging & Debug configuration

=20 =20

Introduction

Logging in eZ Platform consists of two parts, several debug systems that= integrates with symfony developer toolbar to give you detailed information= about what is going on. And standard PSR-3 logger, as provided by S= ymfony using Monolog.

Debuggi= ng in dev environment

When using the Symfony dev environment, the system out of the box tracks ad= ditional metrics for you to be able to debug issues, this includes&nbs= p;Stash cache use (done by Stash= Bundle), and a persistence cache use.

Reducing memory= use

For long running scripts, instead head over to How to run long-running consol= e commands for some much more relevant info.

If you are running out of memory and don't need to keep track of cache h= its and misses. Then StashBundle tracking, represented by the stash.tracking setting, and persi= stence cache logging, represented by the setting parameters.ezpublish.spi.persistence.cache.persistenceLogger.en= ableCallLogging, can optionally be disabled.

 

config_dev.yml
=20
stash:
    tracking: false                  # Default is true in dev
    tracking_values: false           # Default is false in dev, to only tra=
ck cache keys not values
    caches:
        default:
            inMemory: false          # Default is true
            registerDoctrineAdapter: false

parameters:
    ezpublish.spi.persistence.cache.persistenceLogger.enableCallLogging: fa=
lse
=20

Error log= ging and rotation

eZ Platform uses the Monolog component to log errors, and it has a RotatingFileHandler that allows for file rotation.

According to their documentation, it "logs records to a file and creates= one logfile per day. It will also delete files older than $maxFiles<= /code>".

But then, their own recommendation is to use "logrotate" in= stead of doing the rotation in the handler as you would have better perform= ance.

 

 

If you decided to use Monolog's handler, it can be configured in a= pp/config/config.yml

=20
monolog:
    handlers:
        main:
            type: rotating_file
            max_files: 10
            path: "%kernel.logs_dir%/%kernel.environment%.log"
            level: debug
=20

 

 

------=_Part_3333_220609495.1485852749724--