Functionality
This is a VS Code extension that parses and displays PatchMyPC log files with color-coded entries and structured table view. This extension works for various log file formats commonly used by PatchMyPC and Windows applications.
These include:
- Color-coded log entries (Info, Warning, Error)
- Structured table display with sortable columns
- Interactive filtering and search capabilities
- Real-time log file monitoring
- Support for multiple log formats (PatchMyPC XML, CMTrace, generic timestamped)
Install
Open up VS Code and hit F1
and type ext
select Install Extension and type patchmypc-log-parser
hit enter and reload window to enable.

Features

Interactive filtering
- Filter by log type (All/Info/Warning/Error)
- Statistics showing count of each log type
- Search within log messages
- Navigate to context of search result
- Sort ascending or descending by Date & Time
- Switch date format between UK and US
- Enable file watcher to update log in realtime

If a log line is truncated, you can double-click it to see the full line in the context view!
Usage
The extension is activated for log files, and you can parse logs in multiple ways:
Parse a log file
- Right-click on a .log file in the VSCode Explorer and select "Parse Log File(s)"

Open a .log file and click the "Parse Active Log File" button in the editor toolbar
Use Command Palette (Ctrl+Shift+P
or Cmd+Shift+P
) and search for "Parse Log Files(s)"

The PatchMyPC Log Parser extension automatically detects and parses a wide range of log file formats commonly used by PatchMyPC and Windows applications. The following formats are supported:
The primary format used by PatchMyPC applications, featuring structured XML-like tags and attributes.
Example:
<![LOG[Upload of MigrationId: 687e949ac60e6bcad3b2d23e progress: 74% (37/50 chunks)]LOG]!><time="13:24:32.400967" date="07-21-2025" component="<<UploadMultiFile>b__2>d" context="" type="1" thread="39" file="">
Extracted fields:
- Message
- Date
- Time
- Component
- Type (1 = Info, 2 = Warning, 3 = Error)
- Thread
- Context
- File
Used by Windows components, WSUS, and SMS Provider logs. This format is compatible with CMTrace and features delimited fields.
Example:
Adding Handle -277882112 to async call map~ $$<SMS Provider><08-08-2025 13:14:03.084-60><thread=19996 (0x4E1C)>
Extracted fields:
- Message
- Component
- Date
- Time
- Thread
- Type (auto-detected from message content)
The parser supports a variety of generic log formats that include recognizable timestamps. These include:
For all generic formats, the parser extracts:
- Message
- Date (if present)
- Time
- Component (if present)
- Type (auto-detected from message content)
4. Plain Text Logs with Minimal Structure
The extension also attempts to parse plain text logs that contain only time or minimal structure, using best-effort extraction and log level detection based on keywords.
Example:
15:26:42.522 Application started successfully
15:26:43.099 WARNING: Low disk space detected
Note:
- Log type (Info, Warning, Error) is automatically detected for all formats based on message content if not explicitly provided.
- The parser is designed to be robust and flexible, but ambiguous or highly irregular log formats may not be fully supported.
Smart Type Detection
When log entries don't have explicit type information, the parser automatically detects the log level based on message content:
- Error (Type 3): Messages containing "error", "failed", "failure", "exception", "critical", "fatal"
- Warning (Type 2): Messages containing "warning", "warn"
- Info (Type 1): Messages containing "info", "information", "success", "completed", "started", etc.
- Default: Falls back to Info if no keywords are detected
Requirements
- Visual Studio Code 1.102.0 or higher
- Log files in supported formats (auto-detected):
- PatchMyPC XML-like format
- Windows/SMS Provider CMTrace format
- Generic timestamp-based formats (ISO, US, European)
- Plain text logs with time-only timestamps
Known Issues
- Very large log files (>10MB) may cause performance issues during initial parsing
- Complex multi-line log entries may not be parsed correctly in generic formats
- Date formats are auto-detected but may occasionally misinterpret ambiguous dates (e.g., 01/02/2025 could be Jan 2 or Feb 1)