Skip to content

The Magento Log Viewer extension for Visual Studio Code allows you to easily view and manage log files in your Magento project. This extension provides a tree view of log files, the ability to open and clear log files, and a status bar item showing the number of log files.

License

Notifications You must be signed in to change notification settings

OpenForgeProject/vscode-ext-magento-log-viewer

Repository files navigation

Magento Log Viewer

Codacy Badge GitHub Actions Visual Studio Marketplace Installs

The Magento Log Viewer extension for Visual Studio Code provides a convenient way to view and manage Magento log files directly in your workspace.

Magento Log Viewer Screenshot

Features

  • Tree view of log files from Magento's var/log directory
  • Section for Grouped log entries by severity level (ERROR, WARN, DEBUG, INFO)
  • Section for Report files with parsed and optimized titles
  • Quick Search/Filter Box - Real-time filtering of log entries with case-sensitive and regex support
  • Advanced Search Options - Search through log entries with pattern matching and text filtering
  • Intelligent File Caching - Enhanced performance with smart memory management and ~80% faster file reads
  • Option to group log entries by message content
  • Direct file opening with line highlighting
  • One-click log file clearing with confirmation popup
  • Status bar showing total log entries with active search indicator
  • Real-time log file monitoring with optimized cache invalidation
  • Badge in the tree view showing the total number of log entries
  • Improved report file titles by parsing content for better readability
  • Color-coded icons for different log levels (ERROR, WARN, DEBUG, INFO)
  • Individual report file deletion through context menu
  • Automatic update notifications for new extension versions
  • Line-by-line navigation within log files
  • Collapsible sections for identical report error titles\n- Project setting retention between workspace sessions\n- Automatic Log File Cleanup - Configurable auto-deletion of old log files based on age (disabled by default)
  • Periodic Cleanup (Cron-like) - Run cleanup automatically at regular intervals (5min to 24h)

Setup

  1. Install the extension from VS Code marketplace
  2. Open your Magento project workspace
  3. When prompted, confirm it's a Magento project
  4. Select your Magento root directory
  5. The extension will now load your log files

Note: Settings are workspace-specific, allowing different configurations for each Magento project. The extension features intelligent file caching for improved performance, especially with large log files.

Usage

  • View Logs: Open the Magento Log Viewer sidebar (M logo)
  • Search Logs: Click the search icon in the log view header to filter entries in real-time
    • Text Search: Enter any text to filter log entries containing that text
    • Case-Sensitive: Enable in settings (magentoLogViewer.searchCaseSensitive) for exact case matching
    • Regex Support: Enable in settings (magentoLogViewer.searchUseRegex) for pattern matching (e.g., error.*critical)
    • Clear Search: Click the clear icon (visible during active search) to remove filters
  • Clear Logs: Click the trash icon in the view header. A confirmation popup will appear to confirm the action.
  • Refresh: Click the refresh icon or wait for auto-update
  • Navigate: Click on log entries to jump to specific lines
  • Filter: Expand log files to see entries grouped by severity
  • Group by Message: Enable or disable grouping of log entries by message content in the settings. When enabled, the counter will display "grouped" (e.g., INFO (128, grouped)).\n- Delete Reports: Right-click on a report file entry and select "Delete Report File" from the context menu\n- Auto Cleanup: Automatically delete old log files based on configured age\n - Enable/Disable: Control automatic cleanup via magentoLogViewer.enableAutoCleanup setting (disabled by default)\n - Configure Age: Set maximum file age with magentoLogViewer.autoCleanupMaxAge (default: "30d")\n - Supported Formats: Use time formats like "30min" (30 minutes), "2h" (2 hours), "7d" (7 days), "2w" (2 weeks), "3M" (3 months)\n - Manual Cleanup: Click the clock icon in the log view header to run cleanup manually\n - Automatic Run: Cleanup runs silently on extension startup (if enabled)\n- View Updates: Review update notifications when the extension is updated with links to changelog and GitHub

Requirements

  • VS Code 1.95.0+

Enjoy!

About

The Magento Log Viewer extension for Visual Studio Code allows you to easily view and manage log files in your Magento project. This extension provides a tree view of log files, the ability to open and clear log files, and a status bar item showing the number of log files.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •