salvo-logging

Log and trace HTTP requests in Salvo applications using salvo::logging::Logger and tracing.

1|Updated Mar 16, 2024
One-click install
npx skills add https://github.com/tdcare/genies --skill salvo-logging-tdcare
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salvo-logging
Source: https://github.com/tdcare/genies/tree/main/.qoder/skills/salvo-logging
Command: npx skills add https://github.com/tdcare/genies --skill salvo-logging-tdcare

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides standardized request logging and tracing for Salvo applications, enabling observability, troubleshooting, and performance insights across routes and middleware.

Core Features & Use Cases

  • Middleware-based logging: Integrates with salvo::logging::Logger to capture request details, durations, and status codes.
  • Structured traces: Leverages tracing to produce structured, filterable logs and spans for distributed tracing.
  • Observability in production: Supports configurable log formats (text or JSON) and request ID propagation for correlating events.

Quick Start

Add the Logger hoop to your Salvo router to begin collecting observability data.

Frequently Asked Questions about salvo-logging

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

FAQPage Schema
How do I add structured request logging to my Salvo web application?

Add structured request logging to a Salvo web application by attaching the salvo::logging::Logger middleware to your router to capture request details, durations, and status codes automatically. This enables immediate observability across routes.

What is the best way to trace HTTP requests in Rust using Salvo?

Tracing HTTP requests in Rust using Salvo is best handled by combining the salvo::logging::Logger middleware with tracing-subscriber to produce structured, filterable logs and distributed spans for your web services.

Can I configure JSON log formats for Salvo middleware in production?

You can configure JSON log formats for Salvo middleware in production environments to deliver structured logs, which supports request ID propagation for correlating events across distributed traces.

Does Salvo support distributed tracing and span context propagation?

Salvo supports distributed tracing and span context propagation by leveraging the tracing crate to generate structured traces, enabling you to correlate events and troubleshoot performance issues across middleware.

How do I report errors and timing data across Salvo routes?

Report errors and timing data across Salvo routes by applying logging middleware that captures request durations, status codes, and error reporting, feeding directly into structured traces for troubleshooting.