embedlog

Embed a structured logger into Go services with JSON and colored outputs.

6|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/vmkteam/claude-plugins --skill embedlog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: embedlog
Source: https://github.com/vmkteam/claude-plugins/tree/main/plugins/developer/skills/embedlog
Command: npx skills add https://github.com/vmkteam/claude-plugins --skill embedlog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Embedding structured logging into Go services to standardize log output.

Core Features & Use Cases

  • Structured, in-process logging that attaches context fields to every log entry.
  • Dual-level output with JSON logs for production and colorized text for development.
  • Prometheus metrics for log events to monitor log volume and error rates.
  • Easy integration by embedding the logger into service structs.

Quick Start

Instantiate a new embedlog.Logger and replace standard log calls with embedded logger methods in your service.

Frequently Asked Questions about embedlog

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

FAQPage Schema
How do I add structured logging to my Go service?

Add structured logging to a Go service by embedding a logger directly into your service struct, allowing you to attach contextual fields to every log entry and standardize output across in-process components.

How do I route info logs to stdout and errors to stderr in Go?

Route info logs to stdout and errors to stderr in Go by using an embedded structured logger that supports dual-level output, automatically directing standard operational info and error events to separate console streams.

How do I expose Prometheus metrics for log events in a Go application?

Expose Prometheus metrics for log events in a Go application by integrating an embedded structured logger that tracks and exports volume and error rates directly to your monitoring endpoint.

Can I use colorized text for development and JSON for production logs in Go?

You can output colorized text for development and JSON for production logs in Go by configuring an embedded structured logger that supports dual-level output based on your active environment.

Do I need to install external dependencies to embed a logger in my Go struct?

You need to install the required embedlog library to embed the logger into your Go service struct, which then provides structured output, contextual fields, and Prometheus metrics without external routing dependencies.