<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Webapi\Controller\Rest">
        <plugin name="DOFalcon_ApiLogging::RestApiLogRequest" type="DOFalcon\ApiLogging\Plugin\RestApiLog" sortOrder="-1"/>
    </type>
    <type name="Magento\Framework\Webapi\Rest\Response">
        <plugin name="DOFalcon_ApiLogging::RestApiLogResponse" type="DOFalcon\ApiLogging\Plugin\RestApiLog" sortOrder="100"/>
    </type>

    <type name="DOFalcon\ApiLogging\Logger\Handler">
        <arguments>
            <argument name="filesystem" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
        </arguments>
    </type>
    <type name="DOFalcon\ApiLogging\Logger\Logger">
        <arguments>
            <argument name="name" xsi:type="string">rest_api_log</argument>
            <argument name="handlers"  xsi:type="array">
                <item name="system" xsi:type="object">DOFalcon\ApiLogging\Logger\Handler</item>
            </argument>
        </arguments>
    </type>
</config>
