flancer32/mage2_ext_log_api
Composer 安装命令:
composer require flancer32/mage2_ext_log_api
包简介
Magento 2 activities logger (API, JS errors)
README 文档
README
Add ability to log:
- REST API requests/responses to server side logs.
- client side JS errors to browser's local storage (with ability to display these errors on the special page).
Compatible Magento versions: 2.2.x, 2.3.x.
REST API Sample
See logs in ${MAGE_ROOT}/var/log/api.log:
2018-09-05 15:08:57-API.INFO - Route: '/rest/ru/V1/guest-carts/fe9cf0d8828fcb219484b39c12b8cdb7/estimate-shipping-methods' => '/V1/guest-carts/fe9cf0d8828fcb219484b39c12b8cdb7/estimate-shipping-methods'
2018-09-05 15:08:57-API.INFO - Request: {"address":{"region_id":null,"country_id":"US","postcode":null},"cartId":"fe9cf0d8828fcb219484b39c12b8cdb7"}
2018-09-05 15:08:57-API.INFO - Response 'Magento\Quote\Api\GuestShipmentEstimationInterface::estimateByExtendedAddress()': [{"carrier_code":"flatrate","method_code":"flatrate","carrier_title":"Flat Rate","method_title":"Fixed","amount":2000,"base_amount":2000,"available":true,"error_message":"","price_excl_tax":2000,"price_incl_tax":2000}]
Frontend Sample
Go to http://.../fl32log/js/view/:
Module Configuration
Enable additional logging
See Store / Configuration / Advanced / System / Advanced Logging Settings:
Disable "Log JS Errors to Session Storage"
You need to disable "Log JS Errors to Session Storage" that is used for Magento tests (disabled by default).
See Store / Configuration / Advanced / Developer / JavaScript Settings / Log JS Errors to Session Storage:
Attention: section Store / Configuration / Advanced / Developer is available in developer mode only:
$ ./bin/magento deploy:mode:set developer
Installation
$ cd ${MAGE_ROOT} $ composer require flancer32/mage2_ext_log_api $ ./bin/magento module:enable Flancer32_LogApi
if Magento is in development mode:
$ ./bin/magento setup:upgrade $ ./bin/magento setup:di:compile
if Magento is in production mode:
$ ./bin/magento deploy:mode:set developer $ ./bin/magento deploy:mode:set production
flancer32/mage2_ext_log_api 适用场景与选型建议
flancer32/mage2_ext_log_api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 29.78k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2018 年 09 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 flancer32/mage2_ext_log_api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 flancer32/mage2_ext_log_api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 29.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-only
- 更新时间: 2018-09-05



