nlog-analyst

Analyzes NLog trace logs imported into a SQLite database via SQL queries.

1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/todevelopers/todevelopers-marketplace --skill nlog-analyst-todevelopers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nlog-analyst
Source: https://github.com/todevelopers/todevelopers-marketplace/tree/main/plugins/nlog-analyzer/skills/nlog-analyst
Command: npx skills add https://github.com/todevelopers/todevelopers-marketplace --skill nlog-analyst-todevelopers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging C4 framework applications from raw NLog trace logs is slow and error-prone: log files are large, multiline stack traces break naive parsing, and inconsistent plugin naming makes filtering unreliable. This Skill imports .log files into a queryable SQLite database and guides correct interpretation of fields, error patterns, and stack traces. ## Core Features & Use Cases - Automatic database bootstrap: Detects or creates trace_logs.db by running the nlog_import.py importer, then opens it through the sqlite-logs MCP server for SQL querying. - C4-aware log interpretation: Documents the pipe-delimited record format, plugin naming inconsistencies (always filter with LIKE '%plugin%'), process/thread correlation, and common error patterns such as ValidationException and unhandled framework exceptions. - Source code cross-referencing: When the VS MCP server is available, enriches findings with Roslyn-based symbol lookups, caller/callee analysis, and method body inspection. - Use Case: Ask "what errors happened in the MBSecure plugin yesterday" and get the first root-cause exception, its call chain, affected process IDs, and the relevant C# method source. ## Quick Start Ask the assistant to analyze the logs in the current folder, for example by saying "analyze the logs and show me all ERROR entries grouped by plugin".

Frequently Asked Questions about nlog-analyst

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze NLog trace logs with SQL queries?

Import the .log files into a SQLite database using the nlog_import.py script, then open trace_logs.db through the sqlite-logs MCP server. You can then run SQL queries filtering by level, plugin, process_id, thread_id, or timestamp.

How do I filter NLog entries by plugin name in SQLite?

Always use LIKE with wildcards, for example WHERE plugin LIKE '%MBSecure%', because the same plugin appears both as a short name and as a full namespace like Gamanet.C4.Client.Panels.MBSecure.FileImport. Exact equality matching misses entries.

Why are plugin and assembly fields empty on some ERROR records?

Empty plugin and assembly fields indicate unhandled exceptions caught at the framework level before plugin context was established. These records still contain the exception message and a stack_trace whose last line shows the logical call chain.

Can I cross-reference log errors with C# source code?

Yes, when Visual Studio 2022 runs with the VS MCP Server extension, the skill uses FindSymbolDefinition, GetMethodCallers, and GetMethodCalls to inspect the failing methods. Without it, source cross-referencing is skipped silently.

What does the last line of a stack_trace mean in these logs?

The last line is a logical call chain in the format A => B => C, showing the path of method calls leading to the error rather than raw .NET stack frames. Use it to identify the innermost failing method and trace its callers.

What are the limitations of this log analysis approach?

Analysis requires the nlog_import.py importer and the sqlite-logs MCP server to be available, and unparseable lines land in a separate parse_errors table. Source code enrichment only works for .NET codebases with the VS MCP server connected.