logging

Generate structured log messages using Preparing, Successfully, and Failed patterns.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/cameronsjo/dev-toolkit --skill logging-cameronsjo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging
Source: https://github.com/cameronsjo/dev-toolkit/tree/main/skills/logging
Command: npx skills add https://github.com/cameronsjo/dev-toolkit --skill logging-cameronsjo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams create consistent, searchable log messages that illuminate the narrative of an action from start to finish, improving debugging and observability.

Core Features & Use Cases

  • Pattern-based logging: enforce the three-phase narrative (Preparing/Attempting, Successfully, Failed) with structured contextual data.
  • Guidance on levels and context: choose appropriate log levels and attach key-value pairs to each message for easier tracing.
  • Use Case: instrument a file upload so every stage is logged with IDs, duration, and outcomes to simplify incident analysis.

Quick Start

Provide a structured log message for a specific action using the Preparing/Successfully/Failed pattern.

Frequently Asked Questions about logging

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

FAQPage Schema
How do I create structured logs that improve application observability?

Structured logging improves observability by attaching key-value context pairs to messages. You can implement it using a pattern-based approach that enforces a three-phase narrative—Preparing, Successfully, Failed—ensuring consistency and searchability for incident analysis.

What is the best way to structure log messages for debugging?

The best way to structure log messages for debugging is applying a three-phase narrative pattern: Preparing/Attempting, Successfully, and Failed. This approach includes contextual data like IDs and durations to illuminate the action from start to finish.

How do I choose appropriate log levels for specific actions?

Choosing appropriate log levels depends on the action's outcome phase. A pattern-based logging approach provides guidance on selecting levels while attaching key-value pairs to each message, ensuring consistent tracing across preparing, successful, and failed states.

How do I instrument a file upload with structured logging to trace outcomes?

Instrument a file upload with structured logging by applying the Preparing/Successfully/Failed pattern. Log every stage with key-value contextual data such as IDs, duration, and outcomes to simplify incident analysis and improve searchability.

When do I need a pattern-based approach for structured logging?

You need a pattern-based approach for structured logging when teams require consistent, searchable log messages that tell a story. It enforces a defined action pattern and context keys to improve debugging and observability across real-world scenarios.