Skip to content

Fix MSI issues and Logger handler - #50

Open
sandipklevu wants to merge 1 commit into
masterfrom
fix-msi-handle
Open

Fix MSI issues and Logger handler#50
sandipklevu wants to merge 1 commit into
masterfrom
fix-msi-handle

Conversation

@sandipklevu

Copy link
Copy Markdown
Contributor

This pull request introduces a custom logging infrastructure for the SearchSpring Feed module, replacing all usages of the generic Psr\Log\LoggerInterface with a new, module-specific LoggerInterface. It also implements a custom Monolog logger and handler, and refactors the MSI stock provider and resolver to improve dependency management and logging. Additional logging has been added to the feed generation process for better traceability.

Logging Infrastructure Overhaul

  • Introduced SearchSpring\Feed\Api\LoggerInterface and updated all references to use this interface instead of Psr\Log\LoggerInterface. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Added Logger/Handler.php to define a custom log file location for SearchSpring feed logs.
  • Added Logger/SearchSpringLogger.php as a Monolog-based logger implementing the new interface.

MSI Stock Provider and Resolver Refactor

  • Refactored MsiStockProvider to use Magento's object manager for dynamic MSI dependency resolution, improving compatibility and reducing direct dependency injection. Removed direct dependencies on MSI interfaces and replaced with runtime service resolution and caching. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Refactored MsiStockResolver to inject MsiStockProvider and LegacyStockProvider directly, removing use of the global object manager and improving testability. Added caching for module enablement checks. [1] [2]

Enhanced Logging in Feed Generation

  • Added detailed info and error logging to the feed generation process in GenerateFeed.php, including start, completion, and error events with contextual data. [1] [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants