Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
GraphQl-220: Implement exception logging.
Browse files Browse the repository at this point in the history
Removed duplicated logging to var/log/graphql.
  • Loading branch information
Maksym Novik committed Sep 6, 2019
1 parent 9553775 commit 860e239
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions app/etc/graphql/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,4 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Framework\GraphQl\Query\ErrorHandlerInterface" type="Magento\Framework\GraphQl\Query\ErrorHandler"/>
<virtualType name="GraphQlLogger" type="Magento\Framework\Logger\Monolog">
<arguments>
<argument name="handlers" xsi:type="array">
<item name="error" xsi:type="object">GraphQlErrorHandler</item>
</argument>
</arguments>
</virtualType>
<virtualType name="GraphQlErrorHandler" type="Magento\Framework\Logger\Handler\Base">
<arguments>
<argument name="fileName" xsi:type="string">var/log/graphql/exception.log</argument>
</arguments>
</virtualType>
<type name="Magento\Framework\GraphQl\Query\ErrorHandler">
<arguments>
<argument name="logger" xsi:type="object">GraphQlLogger</argument>
</arguments>
</type>
</config>

0 comments on commit 860e239

Please sign in to comment.