LM Studio Logs
WordPress plugin to import LM Studio server logs with syntax highlighting
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/tdw419/lmstudio-logs/archive/refs/heads/main.zipA WordPress plugin that imports LM Studio server logs into WordPress as formatted posts with syntax highlighting.
Description
This plugin imports your LM Studio server logs into WordPress, making it easy to browse, search, and analyze your local LLM usage history.
Features:
- Automatic Discovery - Scans your LM Studio logs directory recursively
- Smart Parsing - Handles both
.logand.jsonlfile formats - Beautiful Formatting - Color-coded log levels (INFO, DEBUG, WARNING, ERROR)
- JSON Highlighting - Pretty-prints JSON payloads with Prism.js
- Metadata Extraction - Captures models used, request counts, timestamps
- Duplicate Detection - Prevents re-importing the same log files
- Configurable Path - Set custom logs directory in settings
Requirements
- WordPress 6.0 or higher
- PHP 8.0 or higher
- LM Studio installed with server logs
Installation
From WordPress.org (Recommended)
- Go to Plugins > Add New in your WordPress admin
- Search for "LM Studio Logs"
- Click Install Now and then Activate
Manual Installation
- Download the latest release
- Upload the
lmstudio-logsfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
Configuration
- Go to Settings > LM Studio Logs
- Set the Logs Directory path (default:
~/.lmstudio/server-logs/) - Save changes
Usage
- Go to LM Studio Logs in the WordPress admin menu
- Review the file count displayed on the page
- Click Import All Logs to import all
.logand.jsonlfiles - View the results: imported count, skipped duplicates, and any errors
Viewing Imported Logs
- Go to Posts in WordPress admin
- Filter by the LM Studio Logs category
- Click any post to view the formatted log
Log Format
The plugin parses the standard LM Studio log format:
[2026-02-22 14:30:15][INFO][llama-3.2-3b] Request received
Each entry shows:
- Timestamp
- Log level (INFO, DEBUG, WARNING, ERROR)
- Model name
- Message content
- JSON payloads (pretty-printed)
Log Levels
| Level | Color | Description |
|---|---|---|
| INFO | Blue | Informational messages |
| DEBUG | Gray | Debug information |
| WARNING | Orange | Warning messages |
| ERROR | Red | Error messages |
Post Meta Fields
Each imported log has these meta fields:
| Meta Key | Description |
|---|---|
_lmstudio_log_file |
Original filename |
_lmstudio_imported_at |
Import timestamp |
_lmstudio_log_date |
Log date |
_lmstudio_total_lines |
Total lines in file |
_lmstudio_total_requests |
Number of requests |
_lmstudio_models |
Models used (comma-separated) |
Customization
Add Prism.js Languages
add_filter('lmstudio_logs_prism_languages', function($languages) {
$languages[] = 'yaml';
return $languages;
});
Custom CSS
Override these CSS classes in your theme:
.lmstudio-log- Log container.lmstudio-header- Header section.lmstudio-entry- Individual log entry.lmstudio-level-*- Level-specific styling.lmstudio-json- JSON code blocks
File Structure
lmstudio-logs/
├── lmstudio-logs.php # Main plugin file
├── includes/
│ ├── class-log-parser.php # Log file parsing
│ ├── class-html-formatter.php # HTML formatting
│ └── class-importer.php # Import engine
├── readme.txt # WordPress.org readme
├── uninstall.php # Cleanup script
├── LICENSE # GPL v2
└── README.md # This file
Troubleshooting
"No log files found"
- Verify LM Studio is installed and has been used
- Check the logs directory path in Settings
- Ensure the directory contains
.logor.jsonlfiles
"Directory not found"
- Use the full path or
~for home directory - Check for typos in the path
- Verify the web server has read permissions
Logs not displaying correctly
- Check that Prism.js is loading (browser dev tools)
- Verify the post has the "LM Studio Logs" category
- Check for JavaScript errors
Changelog
1.0.0
- Initial release
- Log file parsing (.log and .jsonl)
- HTML formatting with syntax highlighting
- Metadata extraction
- Duplicate detection
- Settings page for configurable directory
License
GPL v2 or later. See LICENSE for more information.
Credits
Support
For bug reports and feature requests: