structured-logging

Implement structured logging classes with log levels and Discord error alerts in Laravel.

66|10|Updated Aug 12, 2018
One-click install
npx skills add https://github.com/RaiderIO/keystone.guru --skill structured-logging-raiderio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: structured-logging
Source: https://github.com/RaiderIO/keystone.guru/tree/main/.claude/skills/structured-logging
Command: npx skills add https://github.com/RaiderIO/keystone.guru --skill structured-logging-raiderio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires laravel, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures service traceability and alerting, simplifying the process of adding logging to services, creating Logging classes, and choosing log levels.

Core Features & Use Cases

  • Structured Logging: Use dedicated Logging classes with start/end context grouping and log levels.
  • Alerting: Configure error alerts to be posted to a Discord channel.
  • Testability: Services depend on a {Service}LoggingInterface for test mocks.
  • Cross-service Tracing: Mirrors persistent context into Laravel Context for full request narratives.
  • Filtering, Channels, and Kill Switch: Control log levels, routing, and global logging disablement.

Quick Start

Use the structured-logging skill to set up structured logging for your service, ensuring traceability and efficient error alerts.

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 logging for service traceability in Laravel?

Structured logging for Laravel service traceability is implemented by generating dedicated logging classes that group start and end contexts, apply log levels, and mirror persistent context for full request narratives.

Can I send error alerting logs from Laravel directly to Discord?

Yes, Laravel error alerting can be configured to route specific error logs directly to a Discord channel, ensuring immediate notification when service failures occur.

What is the best way to mock logging dependencies when testing Laravel services?

Mocking logging dependencies is handled by having services depend on a specific logging interface, allowing you to inject test mocks and isolate service logic during unit tests.

How does persistent context mirroring improve cross-service tracing?

Persistent context mirroring improves cross-service tracing by copying contextual request data into Laravel's native Context capability, building a complete and continuous request narrative across distributed services.

Do I need a specific environment to set up dedicated logging classes and log levels?

Yes, an existing Laravel environment with an appropriate base logging setup is required to implement dedicated service logging classes, configure log levels, and apply global kill switches.

How can I control log routing and disable logging globally in a Laravel application?

You can control log routing, apply granular level filtering, and disable logging globally using the built-in kill switch feature to halt all log output during critical incidents or maintenance.