|
1 | | -# Magento Log Viewer |
2 | | -[](https://app.codacy.com/gh/OpenForgeProject/vscode-ext-magento-log-viewer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://github.com/OpenForgeProject/vscode-ext-magento-log-viewer/actions/workflows/test.yml) |
3 | | - |
| 1 | +# 🚀 Magento Log Viewer for VS Code |
4 | 2 |
|
5 | | -The Magento Log Viewer extension for Visual Studio Code provides a convenient way to view and manage Magento log files directly in your workspace. |
| 3 | +[](https://app.codacy.com/gh/OpenForgeProject/vscode-ext-magento-log-viewer/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://github.com/OpenForgeProject/vscode-ext-magento-log-viewer/actions/workflows/test.yml)  |
| 4 | + |
| 5 | +**Professional Log Viewer for Magento & Adobe Commerce Developers** |
| 6 | + |
| 7 | +A powerful VS Code extension that enhances your Magento development workflow with intelligent log management, advanced search capabilities, and automated cleanup tools. |
6 | 8 |
|
7 | 9 |  |
8 | 10 |
|
9 | | -## Features |
10 | | - |
11 | | -- Tree view of log files from Magento's `var/log` directory |
12 | | -- Section for Grouped log entries by severity level (ERROR, WARN, DEBUG, INFO) |
13 | | -- Section for Report files with parsed and optimized titles |
14 | | -- **Quick Search/Filter Box** - Real-time filtering of log entries with case-sensitive and regex support |
15 | | -- **Advanced Search Options** - Search through log entries with pattern matching and text filtering |
16 | | -- **Intelligent File Caching** - Enhanced performance with smart memory management and ~80% faster file reads |
17 | | -- Option to group log entries by message content |
18 | | -- Direct file opening with line highlighting |
19 | | -- One-click log file clearing with confirmation popup |
20 | | -- Status bar showing total log entries with active search indicator |
21 | | -- Real-time log file monitoring with optimized cache invalidation |
22 | | -- Badge in the tree view showing the total number of log entries |
23 | | -- Improved report file titles by parsing content for better readability |
24 | | -- Color-coded icons for different log levels (ERROR, WARN, DEBUG, INFO) |
25 | | -- Individual report file deletion through context menu |
26 | | -- Automatic update notifications for new extension versions |
27 | | -- Line-by-line navigation within log files |
28 | | -- 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) |
29 | | -- **Periodic Cleanup (Cron-like)** - Run cleanup automatically at regular intervals (5min to 24h) |
30 | | - |
31 | | -## Setup |
32 | | - |
33 | | -1. Install the extension from VS Code marketplace |
34 | | -2. Open your Magento project workspace |
35 | | -3. When prompted, confirm it's a Magento project |
36 | | -4. Select your Magento root directory |
37 | | -5. The extension will now load your log files |
38 | | - |
39 | | -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. |
40 | | - |
41 | | -## Usage |
42 | | - |
43 | | -- **View Logs**: Open the Magento Log Viewer sidebar (M logo) |
44 | | -- **Search Logs**: Click the search icon in the log view header to filter entries in real-time |
45 | | - - **Text Search**: Enter any text to filter log entries containing that text |
46 | | - - **Case-Sensitive**: Enable in settings (`magentoLogViewer.searchCaseSensitive`) for exact case matching |
47 | | - - **Regex Support**: Enable in settings (`magentoLogViewer.searchUseRegex`) for pattern matching (e.g., `error.*critical`) |
48 | | - - **Clear Search**: Click the clear icon (visible during active search) to remove filters |
49 | | -- **Clear Logs**: Click the trash icon in the view header. A confirmation popup will appear to confirm the action. |
50 | | -- **Refresh**: Click the refresh icon or wait for auto-update |
51 | | -- **Navigate**: Click on log entries to jump to specific lines |
52 | | -- **Filter**: Expand log files to see entries grouped by severity |
53 | | -- **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 |
54 | | - |
55 | | -## Requirements |
56 | | - |
57 | | -- VS Code 1.95.0+ |
58 | | - |
59 | | -**Enjoy!** |
| 11 | +## ✨ Key Features |
| 12 | + |
| 13 | +### 📁 **Smart Log Management** |
| 14 | +- **Structured Tree View** - All log files from `var/log/` organized clearly |
| 15 | +- **Color-coded Log Levels** - ERROR (red), WARN (orange), DEBUG (yellow), INFO (blue), CRITICAL (pink) |
| 16 | +- **Report File Integration** - Automatic analysis and grouping of `var/report/` files |
| 17 | +- **Real-time Monitoring** - Live updates when files change |
| 18 | + |
| 19 | +### 🔍 **Advanced Search Capabilities** |
| 20 | +- **Real-time Search** - Instant filtering as you type |
| 21 | +- **Regex Support** - Powerful pattern matching (e.g., `error.*critical`) |
| 22 | +- **Case-sensitive Options** - Precise search with case sensitivity control |
| 23 | +- **Smart Grouping** - Identical log entries are automatically grouped |
| 24 | + |
| 25 | +### ⚡ **Performance Optimization** |
| 26 | +- **Intelligent Caching** - Up to 80% faster file access |
| 27 | +- **Memory Management** - Automatic cache memory optimization |
| 28 | +- **Configurable Limits** - Adjust cache size based on project needs |
| 29 | +- **Performance Statistics** - Detailed cache metrics for developers |
| 30 | + |
| 31 | +### 🛠️ **Automated Maintenance** |
| 32 | +- **Auto-Cleanup** - Automatic deletion of old log files by configurable age |
| 33 | +- **Periodic Cleanup** - Cron-like scheduling (5min to 24h intervals) |
| 34 | +- **One-Click Cleanup** - Instant deletion with safety confirmation |
| 35 | +- **Bulk Operations** - Delete report files individually or all at once |
| 36 | + |
| 37 | +## 🚀 Quick Start |
| 38 | + |
| 39 | +### Installation & Setup |
| 40 | +1. **Install Extension** - Direct from VS Code Marketplace |
| 41 | +2. **Open Magento Project** - Load workspace in VS Code |
| 42 | +3. **Confirm Project** - Automatic detection with confirmation dialog |
| 43 | +4. **Select Magento Root** - Integrated folder picker for easy configuration |
| 44 | +5. **Done!** - Log files are automatically loaded |
| 45 | + |
| 46 | +> **💡 Tip:** The extension saves all settings workspace-specific, allowing different configurations for different Magento projects. |
| 47 | +
|
| 48 | +### Getting Started |
| 49 | +- **Open Log Viewer** - Click the Magento logo (M) in the sidebar |
| 50 | +- **Search Logs** - Search icon in the header for live filtering |
| 51 | +- **Open Files** - Direct click on log entries jumps to the corresponding line |
| 52 | +- **Manage Reports** - Right-click menu for individual report deletion |
| 53 | + |
| 54 | +## 📖 Detailed Usage |
| 55 | + |
| 56 | +### Log Management |
| 57 | +- **📊 Overview** - All log files with badge display of entry count |
| 58 | +- **🔄 Auto-Refresh** - Automatic updates when files change |
| 59 | +- **📋 Grouping** - Identical messages are summarized (`INFO (128, grouped)`) |
| 60 | +- **🎯 Navigation** - Direct jump to specific lines in code |
| 61 | + |
| 62 | +### Advanced Search |
| 63 | +- **🔍 Text Search** - Simple text input filters all relevant entries |
| 64 | +- **⚡ Real-time Filter** - Instant results while typing |
| 65 | +- **🎯 Case-Sensitive** - Activatable via settings for exact case matching |
| 66 | +- **🔧 Regex Patterns** - Advanced search patterns for complex filtering |
| 67 | + - Example: `error.*critical` finds all ERROR logs with "critical" |
| 68 | + - Example: `\[2024-12-\d+\]` for all December 2024 entries |
| 69 | +- **🧹 Clear Search** - Clear button (visible during active search) |
| 70 | + |
| 71 | +### Automatic Cleanup |
| 72 | +- **⏰ Auto-Cleanup** - Configurable deletion by file age |
| 73 | + - Supported formats: `30min`, `2h`, `7d`, `2w`, `3M` |
| 74 | + - Disabled by default for safety |
| 75 | +- **🔄 Periodic Cleanup** - Automatic execution at intervals |
| 76 | + - Intervals: 5min to 24h selectable |
| 77 | + - Recommended: `1h` for production, `6h` for development |
| 78 | +- **🗑️ Manual Cleanup** - Clock icon for immediate cleanup |
| 79 | +- **⚠️ Safety** - Confirmation dialogs for critical operations |
| 80 | + |
| 81 | +### Report Management |
| 82 | +- **📁 Structured View** - Automatic title optimization through content parsing |
| 83 | +- **🔍 Separate Search** - Independent search function for report files |
| 84 | +- **🗑️ Selective Deletion** - Individual reports via right-click context menu |
| 85 | +- **🧹 Bulk Operations** - Delete all reports at once |
| 86 | + |
| 87 | +## ⚙️ Configuration |
| 88 | + |
| 89 | +### Performance Settings |
| 90 | +```json |
| 91 | +{ |
| 92 | + "magentoLogViewer.cacheMaxFiles": 50, // Max files in cache |
| 93 | + "magentoLogViewer.cacheMaxFileSize": 10, // Max file size in MB |
| 94 | + "magentoLogViewer.enableCacheStatistics": false // Debug statistics |
| 95 | +} |
| 96 | +``` |
| 97 | + |
| 98 | +### Cleanup Configuration |
| 99 | +```json |
| 100 | +{ |
| 101 | + "magentoLogViewer.enableAutoCleanup": false, // Enable auto-cleanup |
| 102 | + "magentoLogViewer.autoCleanupMaxAge": "7d", // Maximum file age |
| 103 | + "magentoLogViewer.enablePeriodicCleanup": false, // Periodic execution |
| 104 | + "magentoLogViewer.periodicCleanupInterval": "6h" // Cleanup interval |
| 105 | +} |
| 106 | +``` |
| 107 | + |
| 108 | +### Display Options |
| 109 | +```json |
| 110 | +{ |
| 111 | + "magentoLogViewer.groupByMessage": true, // Group messages |
| 112 | + "magentoLogViewer.searchCaseSensitive": false, // Case-sensitive search |
| 113 | + "magentoLogViewer.searchUseRegex": false // Regex support |
| 114 | +} |
| 115 | +``` |
| 116 | + |
| 117 | +## 🎯 Supported Magento Versions |
| 118 | + |
| 119 | +- ✅ **Magento 2.x** (all versions) |
| 120 | +- ✅ **Adobe Commerce** (On-Premise & Cloud) |
| 121 | +- ✅ **Adobe Commerce Cloud** |
| 122 | +- ✅ **Magento Open Source** |
| 123 | +- ✅ **Custom Log Structures** |
| 124 | + |
| 125 | +## 🔧 System Requirements |
| 126 | + |
| 127 | +- **VS Code** 1.95.0 or higher |
| 128 | +- **Magento Project** with standard `var/log` and `var/report` structure |
| 129 | +- **Node.js** (automatically installed with VS Code) |
| 130 | + |
| 131 | +## 🤝 Support & Contributing |
| 132 | + |
| 133 | +### Report Issues |
| 134 | +- 🐛 **Bug Reports** - [GitHub Issues](https://github.com/OpenForgeProject/vscode-ext-magento-log-viewer/issues) |
| 135 | +- 💡 **Feature Requests** - [GitHub Discussions](https://github.com/OpenForgeProject/vscode-ext-magento-log-viewer/discussions) |
| 136 | + |
| 137 | +### Support Development |
| 138 | +- ⭐ **Rate Extension** - [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=MathiasElle.magento-log-viewer) |
| 139 | +- 💖 **Sponsoring** - [GitHub Sponsors](https://github.com/sponsors/dermatz) |
| 140 | +- 🔧 **Contributing** - Pull requests welcome! |
| 141 | + |
| 142 | +--- |
| 143 | + |
| 144 | +**Built with ❤️ for the Magento Community** |
| 145 | + |
| 146 | +*Enhance your productivity with intelligent log management directly in VS Code!* |
0 commit comments