nodefony-tail-error-logs

Extracts error lines and stack traces from Nodefony server logs using grep and sed.

Updated Dec 19, 2023
One-click install
npx skills add https://github.com/nodefony/nodefony-core --skill nodefony-tail-error-logs-nodefony
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodefony-tail-error-logs
Source: https://github.com/nodefony/nodefony-core/tree/main/.claude/skills/nodefony-tail-error-logs
Command: npx skills add https://github.com/nodefony/nodefony-core --skill nodefony-tail-error-logs-nodefony

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reading the full Nodefony server log wastes context and time because it contains thousands of lines of 200 OK requests, Rollup output, and debug noise. This Skill filters /tmp/nodefony-server.log down to only the ERROR, CRITIC, TypeError, SyntaxError, and stack trace lines needed to diagnose a failure. ## Core Features & Use Cases - Surgical log filtering: Strips ANSI color codes and keeps only error lines, non-2xx requests, or CRITIC entries with surrounding stack context. - Diagnostic heuristics: Maps common log patterns (SyntaxError on exports, EADDRINUSE, ECONNREFUSED, repeated 404s) to their probable causes and fixes. - Safe operations guidance: Warns against killing ports with lsof | xargs kill -9 and directs to nodefony stop instead. - Use Case: An integration test fails with a 500. Run the filtered tail command to instantly see the CRITIC line and its stack trace, identify a stale dist build, rebuild the module, and restart the server. ## Quick Start Ask the assistant to show the recent server errors from the Nodefony log to find out why the test failed.

Frequently Asked Questions about nodefony-tail-error-logs

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

FAQPage Schema
How do I filter server logs to show only errors?

Pipe the log through sed to strip ANSI codes, then grep for patterns like ERROR, CRITIC, TypeError, and SyntaxError. Tailing the last few hundred lines first keeps the output focused on recent failures.

How to debug a Nodefony integration test failure?

Check /tmp/nodefony-server.log for ERROR or CRITIC lines and non-2xx requests around the failure time. Common causes include stale dist builds, dead servers (ECONNREFUSED), and port conflicts on 5151/5152.

Why does Nodefony crash at boot with CRITIC KERNEL terminate?

A CRITIC KERNEL terminate at boot indicates an early crash, so read the stack trace lines immediately preceding it. A frequent cause is a stale module dist missing an export, fixed by rebuilding the package and restarting.

Is it safe to kill a process by port with lsof and kill -9?

No. Without the -sTCP:LISTEN filter, lsof also returns clients connected to that port, so kill -9 can terminate browsers, agents, or even the launching process itself. Use nodefony stop, which is scoped to the current project.

When should I not use grep-based log filtering?

Avoid it for structured JSON client logs, where jq is the right tool, and for vitest test output, which should be read directly from the runner. Production logs from Docker or stdout also need different sources and paths.