ppsspp_analyze_log
Filter PPSSPP log files for ERROR, WARNING, or CRASH lines to isolate emulator issues. Supports keyword and severity matching for targeted debugging.
Instructions
PURPOSE: Filter a PPSSPP log file for ERROR / WARNING / CRASH lines.
USAGE: log_path optional (defaults to the server-mirrored PPSSPP broadcast log at .ppsspp-dfx/output/ppsspp.log, written while a session runs); filter optional (keyword); session_id optional.
BEHAVIOR: READ-ONLY. Reads and filters a log file. Does not contact PPSSPP.
RETURNS: {log_path, matches: [{line_no, text}...], count, filter, filter_mode, total_matches, truncated}. truncated=true covers both an explicit limit cut and the internal 500-match cap; total_matches is a lower bound (>= the value) whenever truncated=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Cap the returned match list (0 = no cap beyond the hard internal cap of 500). When truncation happens the response carries total_matches and truncated=true; total_matches is a LOWER BOUND whenever truncated=true (the scan stops at 500 matches, so the real count can be higher). Use this on long logs instead of receiving 200KB+ of matches. | |
| filter | No | Additional keyword to filter for. Case-sensitive substring match; combined with the severity keywords per filter_mode. | |
| log_path | No | Path to the log file to analyze. Whitelist: must be a file anywhere inside the server-managed .ppsspp-dfx tree (the whole tree is allowed, wider than output/ or config/ — verified against the runtime whitelist); arbitrary filesystem paths are rejected. If None, reads the server-mirrored PPSSPP broadcast log (.ppsspp-dfx/output/ppsspp.log — the running game's own ERROR/WARNING lines, captured while a session runs). | |
| session_id | No | Optional session ID (reserved for future use; ignored). | |
| filter_mode | No | 'any' (default, legacy): a line matches if it contains a severity keyword OR the filter. 'all': a line must contain a severity keyword AND the filter — use this to narrow (e.g. filter='GPU', filter_mode='all' → only GPU-related ERROR/WARNING/CRASH lines). | any |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of matches (after limit truncation). | |
| filter | Yes | User-supplied keyword filter. | |
| matches | Yes | Matching log lines. | |
| log_path | Yes | Path to the log file (or '(default)' if from launcher). | |
| truncated | Yes | True when limit truncated the match list. | |
| filter_mode | Yes | Filter combination mode: 'any' (legacy OR) or 'all' (severity AND filter). | |
| total_matches | Yes | Match count before limit truncation. |