WP Manifestindependent plugin directory
manifest / ai / lmstudio-logs

LM Studio Logs

WordPress plugin to import LM Studio server logs with syntax highlighting

by Geometry OS · github.com/tdw419/lmstudio-logs · website

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

A 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 .log and .jsonl file 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)

  1. Go to Plugins > Add New in your WordPress admin
  2. Search for "LM Studio Logs"
  3. Click Install Now and then Activate

Manual Installation

  1. Download the latest release
  2. Upload the lmstudio-logs folder to /wp-content/plugins/
  3. Activate the plugin through the 'Plugins' menu in WordPress

Configuration

  1. Go to Settings > LM Studio Logs
  2. Set the Logs Directory path (default: ~/.lmstudio/server-logs/)
  3. Save changes

Usage

  1. Go to LM Studio Logs in the WordPress admin menu
  2. Review the file count displayed on the page
  3. Click Import All Logs to import all .log and .jsonl files
  4. View the results: imported count, skipped duplicates, and any errors

Viewing Imported Logs

  1. Go to Posts in WordPress admin
  2. Filter by the LM Studio Logs category
  3. 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 .log or .jsonl files

"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: