MojtabaTavakkoli/log_pilot
Real-time structured logging for Flutter with AI agent support. Box-bordered errors, MCP server, DevTools extension, log history, sinks, breadcrumbs, network interceptors, and structured output for LLM workflows. Connect your AI coding agents directly to your app's debug console.
Platform-specific configuration:
{
"mcpServers": {
"log_pilot": {
"command": "npx",
"args": [
"-y",
"log_pilot"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
[](https://pub.dev/packages/log_pilot) [](LICENSE) [](https://dart.dev) [](https://flutter.dev)
The first Flutter logging package built for AI agents.
LogPilot gives AI coding agents (Cursor, Claude Code, Windsurf, Copilot, Gemini CLI) live access to your Flutter app's logs through an MCP server and DevTools extension — no manual copy-paste, no stale terminal output. Agents can query, filter, watch, and change log levels at runtime while you code.
It also does everything you expect from a logger — pretty console output, structured metadata, sinks, file logging, breadcrumbs — but the differentiator is the agent-first architecture: your AI assistant sees what your app sees, in real time.
void main() {
LogPilot.init(child: const MyApp());
}
// Anywhere in your app:
LogPilot.info('User signed in', metadata: {'userId': '123'});
LogPilot.error('Payment failed', error: e, stackTrace: st);---
> If you are an AI coding agent reading this README, this section gives > you everything you need. The rest of the README is for human developers.
The app already depends on log_pilot. Use LogPilot for all logging — never raw print() or debugPrint().
import 'package:log_pilot/log_pilot.dart';LogPilot.verbose('Starting sync...');
LogPilot.debug('Cache key: user_42');
LogPilot.info('Order placed', metadata: {'orderId': 'ORD-456', 'total': 29.99});
LogPilot.warning('Retry attempt 3/5');
LogPilot.error('Checkout failed', error: e, stackTrace: st);
LogPilot.fatal('Database corrupted');Every method accepts optional error, stackTrace, metadata (Map), and tag (String).
Loading reviews...