Skip to content

Commit

Permalink
Update CHANGELOG and README for version 1.2.0: add bug report and fea…
Browse files Browse the repository at this point in the history
…ture request templates, change settings to workspace-specific
  • Loading branch information
dermatz committed Nov 16, 2024
1 parent 60f3311 commit d94d855
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ All notable changes to the "magento-log-viewer" extension will be documented in
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

## [1.2.0] - 2024-11-17
### Added
- Comprehensive bug report template
- Detailed feature request template
### Changed
- Settings are now saved in the workspace instead of globally in the USER.

## [1.1.0] - 2024-11-16
### Added
Expand Down
49 changes: 23 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,36 @@
# Magento Log Viewer

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 entries.

![Magento Log Viewer Screenshot](resources/screenshot.png)
The Magento Log Viewer extension for Visual Studio Code provides a convenient way to view and manage Magento log files directly in your workspace.

## Features

- **View Log Files**: Displays a tree view of log files in the `var/log` directory of your Magento project.
- **Open Log Files**: Open log files directly in the editor by clicking on them in the tree view.
- **Collapsible Log Lines**: Each log file can be expanded to view individual lines.
- **Clear Log Files**: Clear all log files with a single command.
- **Status Bar Item**: Shows the number of log entries in the status bar.

## Requirements
- Tree view of log files from Magento's `var/log` directory
- Grouped log entries by severity level (ERROR, WARN, DEBUG, INFO)
- Direct file opening with line highlighting
- One-click log file clearing
- Status bar showing total log entries
- Real-time log file monitoring

- Visual Studio Code version 1.95.0 or higher.
- A Magento project with log files located in the `var/log` directory.
## Setup

## Getting Started
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

1. **Install the extension**: Install the Magento Log Viewer extension from the Visual Studio Code marketplace.
2. **Open your Magento project**: Open your Magento project in Visual Studio Code.
3. **Configure the extension**: When you open a workspace, the extension will prompt you to specify if it is a Magento project. If you select "Yes", you will be prompted to select the Magento root folder.
4. **View log files**: The log files will be displayed in the tree view under the "Magento Log Viewer" activity bar.
5. **Open log files**: Click on any log file in the tree view to open it in the editor.
6. **Expand log files**: Click on the arrow next to a log file to expand and view individual lines.
7. **Clear log files**: Use the "Clear all Logs" command to delete all log files in the `var/log` directory.
Note: Settings are workspace-specific, allowing different configurations for each Magento project.

## Usage

1. **Install the extension**: Install the Magento Log Viewer extension from the Visual Studio Code marketplace.
2. **Configure the extension**: When you open a workspace, the extension will prompt you to specify if it is a Magento project. If you select "Yes", you will be prompted to select the Magento root folder.
3. **View log files**: The log files will be displayed in the tree view under the "Magento Log Viewer" activity bar.
4. **Open log files**: Click on any log file in the tree view to open it in the editor.
5. **Expand log files**: Click on the arrow next to a log file to expand and view individual lines.
6. **Clear log files**: Use the "Clear all Logs" command to delete all log files in the `var/log` directory.
- **View Logs**: Open the Magento Log Viewer sidebar (M logo)
- **Clear Logs**: Click the trash icon in the view header
- **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

## Requirements

- VS Code 1.95.0+

**Enjoy!**
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magento-log-viewer",
"displayName": "Magento Log Viewer",
"description": "A Visual Studio Code extension to view and manage Magento log files.",
"version": "1.1.0",
"version": "1.2.0",
"publisher": "MathiasElle",
"icon": "resources/logo.png",
"repository": {
Expand Down Expand Up @@ -44,12 +44,14 @@
"type": "string",
"enum": ["Yes", "No", "Please select"],
"default": "Please select",
"description": "This is a Magento project"
"description": "This is a Magento project",
"scope": "resource"
},
"magentoLogViewer.magentoRoot": {
"type": "string",
"default": "",
"description": "Path to the Magento root folder"
"description": "Path to the Magento root folder",
"scope": "resource"
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ export function activate(context: vscode.ExtensionContext) {
const defaultUri = workspaceFolders && workspaceFolders.length > 0 ? workspaceFolders[0].uri : undefined;
vscode.window.showOpenDialog({ defaultUri, canSelectFolders: true, canSelectMany: false, openLabel: 'Select Magento Root Folder' }).then(folderUri => {
if (folderUri && folderUri[0]) {
config.update('magentoLogViewer.magentoRoot', folderUri[0].fsPath, vscode.ConfigurationTarget.Global).then(() => {
config.update('magentoLogViewer.magentoRoot', folderUri[0].fsPath, vscode.ConfigurationTarget.Workspace).then(() => {
vscode.window.showInformationMessage('Magento root folder successfully saved!');
config.update('magentoLogViewer.isMagentoProject', 'Yes', vscode.ConfigurationTarget.Global);
config.update('magentoLogViewer.isMagentoProject', 'Yes', vscode.ConfigurationTarget.Workspace);
activateExtension(context, folderUri[0].fsPath);
});
}
});
}
});
} else {
config.update('magentoLogViewer.isMagentoProject', selection, vscode.ConfigurationTarget.Global);
config.update('magentoLogViewer.isMagentoProject', selection, vscode.ConfigurationTarget.Workspace);
}
});
} else if (isMagentoProject === 'Yes') {
Expand Down

0 comments on commit d94d855

Please sign in to comment.