Pimcore logging and debug mode


#1

Hi,

We have problems with Pimcore not logging unexpected exceptions in our testing environment. We have not changed any of the default debugging settings.

If we activate “debug” on the testing environment, the applications is so slow that it starts timingout all the time and you can’t even load the documents three. This problem disappears after a while but always occurs after a deploy and cache:clear execution. When debug is on we can see exceptions in the log /var/logs/php.log.

Any suggestions?

The system is running on AWS in Ubuntu.
PHP 7.1
Pimcore: 5.2.1

// Dzemal
Developer @ Ateles


#2

Try setting log-level in system settings, i.e. to ERROR, this way only important messages will be saved to file. Also you can try logging into separate application (graylog or logstash + kibana is great) instead of writing into files.


#3

Thanks for the reply!

I can not see any way of setting the log-level in the system settings.


#4

Oh sorry, I was looking quickly at demo.pimcore.org, but there is still Pimcore 4. It seems that you need to set PIMCORE_PHP_ERROR_REPORTING constant, as described in docs: https://pimcore.com/docs/5.x/Development_Documentation/Development_Tools_and_Details/Logging.html#page_php-log


#5

are you actually running in testing ENV?


#6

To be more clear; Testing is a environment (not local unit/acceptance testing) and the name of the environment in config is “test2”.

Could there be a possibility that Pimcore or Symfony checks if ENV name comtains “test” string and deactivates/behaves differently based on that? One idea I got last night was to rename the ENV to “demo” because another project we have is using “demo” and there logging is working fine.

Thanks for the help guys!


#7

no, and pimcore shouldn’t do that as well. I am asking cause in env ‘test’ pimcore does some stuff that makes that env only usable for actual testing with unit-tests or stuff like that.

Do you maybe have a custom exception handler?