project-logging

Implements a database-backed structured logging system with SQL Server and job tracking.

Updated Nov 21, 2025
One-click install
npx skills add https://github.com/donchrillo/temu --skill project-logging-donchrillo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-logging
Source: https://github.com/donchrillo/temu/tree/main/.opencode/skills/project-logging
Command: npx skills add https://github.com/donchrillo/temu --skill project-logging-donchrillo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill replaces outdated file-based logging with a robust, database-driven system for structured logging, enabling better traceability, filtering, and analysis of application events and job lifecycles.

Core Features & Use Cases

  • Structured Logging: Logs include job_id, level, message, status, and duration_seconds for detailed tracking.
  • Job-Lifecycle Management: Tracks the start, progress, and end of jobs with success/failure status and duration.
  • Error Handling: Differentiates between INFO, WARNING, and ERROR levels, with detailed error text capture.
  • Use Case: Monitor a complex order processing workflow, track each step's success or failure, and quickly identify performance bottlenecks or critical errors by querying the logs in the database.

Quick Start

Use the project-logging skill to start a new job with ID 'order_processing_123' and log an informational message about starting the process.

Frequently Asked Questions about project-logging

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

FAQPage Schema
How do I implement structured database logging for job tracking?

Structured database logging is implemented by centralizing logs in SQL Server with fields for job ID, level, status, and duration. This replaces outdated file-based logging, enabling better traceability, filtering, and analysis of application job lifecycles.

What is the best way to track job lifecycle status and duration in a database?

Tracking job lifecycle status and duration in a database requires structured log entries that capture the start, progress, and end of jobs. The system records success or failure status alongside duration_seconds to provide detailed operational insights and identify bottlenecks.

Can I use SQL Server for application error handling and performance monitoring?

SQL Server can be used for application error handling and performance monitoring by differentiating between INFO, WARNING, and ERROR levels. The system captures detailed error text and performance metrics, ensuring consistent and actionable operational insights.

Does structured logging handle high throughput without blocking application performance?

Structured logging handles high throughput by using an in-memory buffer to optimize performance. This buffer prevents database write operations from blocking the application, while a fallback file logger ensures no log data is lost if the database becomes unavailable.

How do I query application logs to identify bottlenecks in an order processing workflow?

Querying application logs to identify bottlenecks involves filtering structured database records by job ID, status, and duration. This allows you to monitor complex workflows, track each step's success or failure, and quickly pinpoint performance issues.

When should I replace file-based logging with a database-driven logging system?

You should replace file-based logging with a database-driven system when you need robust traceability, advanced filtering, and job lifecycle analysis. A database approach centralizes logs for structured querying, which flat files cannot efficiently support.