Log AnalysisHighlight your logs with colorful filters, and manipulate what to display for better log file reading. This helps you focus on log analysis and use your time efficiently. This extension is a fork of the Log Analysis project, created to introduce and test new features in advance or to implement upcoming requirements. The goal of this project is to eventually contribute these enhancements back to the original Log Analysis project for long-term integration. We encourage you to freely share any issues or suggestions for improvement you encounter while using this extension. Your feedback is valuable and helps us enhance the project. Features
UsageThe basic operation for log analysis is as follows. Select a project from the "Log Analysis" menu, and you will be directed to the "FILTERS" tab. The tab lists the filter information for the selected project. You can activate filters from the list or control highlights to focus on log analysis in Focus Mode. The left editor holds the original document, and all the lines that matches any of the filters have been highlighted. The right editor holds the focus mode of the left document, and notice that the lines which don't match any of the filters' regex are gone. The focus mode is implemented as a virtual document (read-only), and the original document is not modified. If there are lines in the filtered results that you want to exclude, you can add filters for this purpose in the "FILTERS-" tab. Customization for filtersThis extension creates a tab "FILTERS" in the explorer sidebar. This tab holds all the filters created and allows for filter management. GroupA group can contain multiple filters, and filters within a group can be controlled collectively. This allows you to group filters suitable for log analysis. For each group, there are two controls and three attributes:
FilterThe filled/unfilled circle represents the color of the filter and whether the highlight is applied to documents. The text represents the regex of the filter, and the number in a smaller font, if there is one, represents the number of lines that match the regex in the active editor. For each filter, there is one control and four attributes:
Exclusion FilterThis extension also creates a "FILTERS-" tab in the explorer sidebar. In this tab, you can add exclusion filters to remove unnecessary information from the focused filter results during log analysis. For exclusion filters, there are two controls and one attribute:
Filter Control
Filter Properties
Focus ModeYou can use Project ConfigurationThis extension also creates a "Log Analysis" in the activity bar. Projects are created and selected in "Log Analysis." When a project is selected, you will be directed to the "FILTERS" tab, where you can see the project name. Click the add group icon to add a group, and then click the add filter icon within the group to add the necessary filters. To save the configured project, click the project save icon in the "FILTERS" tab. This allows users to freely modify filters in the "FILTERS" tab and intentionally update the file. Clicking the refresh icon in "Log Analysis" will reload the filter information saved in the file. When a project is selected and loaded, all filters are set to the disabled state. Project settings can be also configured by clicking the settings gear icon in "Log Analysis" and editing the configuration file in JSON format. Handling Huge FilesIn VS Code, when opening files larger than 50MB, the use of extensions is restricted to ensure performance and memory efficiency. This limitation helps maintain a responsive and stable environment when handling large files. More details on this can be found in #31078. By using the extension below, you can enable extension functionality when opening large files, allowing for log analysis. |