Magento2: Exception log is missing backtrace

Created on 11 Jan 2018  路  6Comments  路  Source: magento/magento2


Preconditions


  1. Magento version 2.2.x

Steps to reproduce

  1. Create any exception in the site
  2. Open var/log/exception.log

Expected result

  1. We expect the exception error detail is there with FULL debug backtrace

Actual result

  1. We only get the exception error message without the backtrace so it is impossible to identifier where the issue start.

Format is valid needs update

Most helpful comment

@magento-engcom-team very strange, look like you are intended to close issues than listening from community. I had to make many research and testes before reporting this to you but you take it very fast.

And I'm seeing many other cases which is true to many people (including me) and you just close them :)
https://github.com/magento/magento2/issues/12097

All 6 comments

@onlinebizsoft Thanks for your report. With such steps, no exceptions will be logged into exception.log, but into report.log Please provide more detailed steps in order for us to reproduce the actual issue.

@magento-engcom-team well this is correct with every exception. And in my exception log file, we only get something like this

[2018-01-11 09:29:22] main.CRITICAL: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. {"exception":"[object] (Exception(code: 0): Item (Magento\Catalog\Model\Product\Interceptor) with the same ID \"1986\" already exists. at /home/led/domain.com/vendor/magento/framework/Data/Collection.php:404)"} []
[2018-01-11 09:30:27] main.CRITICAL: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. {"exception":"[object] (Exception(code: 0): Item (Magento\Catalog\Model\Product\Interceptor) with the same ID \"1986\" already exists. at /home/led/domain.com/vendor/magento/framework/Data/Collection.php:404)"} []
[2018-01-11 09:42:29] main.CRITICAL: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. {"exception":"[object] (Exception(code: 0): Item (Magento\Catalog\Model\Product\Interceptor) with the same ID \"1986\" already exists. at /home/led/domain.com/vendor/magento/framework/Data/Collection.php:404)"} []

So you can see there is no backtrace
(I expect a backtrace like this
Exception #0 (Exception): Item (Magento/CatalogInventory/Model/Stock/Status/Interceptor) with the same ID "98" already exists.

0 lib/internal/Magento/Framework/Data/AbstractSearchResult.php(233): Magento/Framework/Data/AbstractSearchResult->addItem(Object(Magento/CatalogInventory/Model/Stock/Status/Interceptor))

1 lib/internal/Magento/Framework/Data/AbstractSearchResult.php(102): Magento/Framework/Data/AbstractSearchResult->load()

2 app/code/Magento/CatalogInventoryConfigurableProduct/Plugin/GetInStockAttributeOptionsPlugin.php(62): Magento/Framework/Data/AbstractSearchResult->getItems()

3 lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento/CatalogInventoryConfigurableProduct/Plugin/GetInStockAttributeOptionsPlugin->afterGetAttributeOptions(Object(Magento/ConfigurableProduct/Model/AttributeOptionProvider/Interceptor), Array, Object(Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor), '128')

..........
..............)

It looks like a change in Magento 2.2.x

@onlinebizsoft Seems like it's a Feature Request and not a core issue. Feel free to make a pull request for this. We recently made some changes to the way we process GitHub submissions to more quickly identify and respond to core code issues. Feature Requests and Improvements should now be submitted to the new Magento 2 Feature Requests and Improvements forum (see details here). Thank you

@magento-engcom-team very strange, look like you are intended to close issues than listening from community. I had to make many research and testes before reporting this to you but you take it very fast.

And I'm seeing many other cases which is true to many people (including me) and you just close them :)
https://github.com/magento/magento2/issues/12097

@onlinebizsoft please submit Feature Request instead just like @magento-engcom-team mentioned.

I don't think it's a feature request because I can confirm that backtraces were logged in the exception.log file in Magento 2.1.x shops. In 2.2.x and 2.3.x shops this no longer seems to happen.
So either this was changed on purpose or either it was broken due to a bug.

Can somebody else confirm this and does somebody else know what happened here?
We should probably re-open this ticket?

Was this page helpful?
0 / 5 - 0 ratings