williankeller / magento2-log-webapi Goto Github PK
View Code? Open in Web Editor NEWThis extension creates log files and save all transactions that are requested through your store's Rest API.
License: Open Software License 3.0
This extension creates log files and save all transactions that are requested through your store's Rest API.
License: Open Software License 3.0
Hi,
thanks for free extension!
I just found a bug, which causes extension to crash (and thus the entire system to display an exception report) if API request is formatted as XML.
Example API request:
curl -X POST https://{domain}/api/rest/v1/products/special-price \ -H 'Content-Type: application/xml' \ -H 'Accept: application/xml' -H 'Authorization: Bearer {token}' \ -d '<?xml version="1.0" encoding="UTF-8"?> <request> <prices> <item> <price>30.00</price> <store_id>1</store_id> <sku>0000212121</sku> <price_from>2020-06-08 15:00:00</price_from> <price_to>2020-06-09 23:59:10</price_to> </item> </prices> </request>'
I tracked down the issue, and it seems that the problem is in \Magestat\LogWebapi\Model\Logger::write
method. While constructing the $data
array, it tries to format the body
as json
using the standard Magento\Framework\Serialize\SerializerInterface
.
I was unable to reproduce the issue on fresh system, if the extension was turned off.
Can we improve specified method to use other serializer/formatter basing on Content-Type
header?
Look like it is not updated to work with Magento 2.3.3 yet. Please update composer to be compatible.
Can this be updated to capture API requests with the store code?
File vendor/magestat/module-log-webapi/Model/Handler/LogFile.php
"LogWebApi" should be "LogWebapi"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.