Created
September 10, 2018 11:47
-
-
Save martinboy/3999fb5efe12bf4484ea1a0f6d404da3 to your computer and use it in GitHub Desktop.
Magenta 2 snippets: Custom debug log file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<virtualType name="VirtualDebug" type="Magento\Framework\Logger\Handler\Base"> | |
<arguments> | |
<argument name="fileName" xsi:type="string">/var/log/custom_error.log</argument> | |
</arguments> | |
</virtualType> | |
<virtualType name="VirtualLogger" type="Magento\Framework\Logger\Monolog"> | |
<arguments> | |
<argument name="handlers" xsi:type="array"> | |
<item name="debug" xsi:type="object">VirtualDebug</item> | |
</argument> | |
</arguments> | |
</virtualType> | |
<type name="Vendor\Model\Model\Log"> | |
<arguments> | |
<argument name="logger" xsi:type="object">VirtualLogger</argument> | |
</arguments> | |
</type> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment