structured-logging

Implement JSON-based structured logging for Convex backend actions.

7|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/planetaryescape/blah.chat --skill structured-logging-planetaryescape
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: structured-logging
Source: https://github.com/planetaryescape/blah.chat/tree/main/.claude/skills/structured-logging
Command: npx skills add https://github.com/planetaryescape/blah.chat --skill structured-logging-planetaryescape

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a standardized approach to JSON-based logging for Convex backend actions, ensuring consistent, structured logs that are easy to search and monitor.

Core Features & Use Cases

  • JSON-structured logs with levels (debug, info, warn, error) for all backend events.
  • Context object pattern to attach IDs, counts, and enums without bloating messages.
  • Tag conventions to categorize logs by feature and subsystem (e.g., Generation, Sources).
  • Rich error context and safe serialization to aid debugging without leaking sensitive data.
  • Use Cases: debug router decisions, trace generation flows, monitor system health and failures.

Quick Start

Start by importing the Convex backend logger from convex/lib/logger.ts into your codebase and use logger.info/debug/warn/error for events. Then configure your log outputs to JSON for structured dashboards.

Frequently Asked Questions about structured-logging

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

FAQPage Schema
How do I implement structured JSON logging in a Convex backend?

You can attach context objects in Convex logs by passing them to the logger methods, allowing you to include IDs, counts, and enums as structured data without bloating the main log message strings.

What is the best way to trace generation flows in Convex backend actions?

Structured logging for Convex backends enforces a log level system, context object patterns, tag conventions, and safe error serialization to aid debugging without leaking sensitive data.

Can I use this structured logging approach for monitoring TypeScript backend failures?

Yes, you can use this structured logging approach to monitor TypeScript backend failures by outputting standard JSON log lines with error levels and rich error context, enabling structured dashboards for system health tracking.

How do I prevent sensitive data from leaking when logging Convex errors?

To prevent sensitive data from leaking when logging Convex errors, the logger applies safe serialization and rich error context patterns, ensuring your structured JSON outputs remain secure for debugging scenarios.