awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
charmbracelet avatar

charmbracelet/log

0
View on GitHub↗
3,121 stars·87 forks·Go·mit·26 views

Log

This is a structured logging library designed to produce logs using key-value pairs, severity levels, and machine-readable formats. It provides a toolkit for creating logs that are consistent for both human review and machine parsing.

The project is distinguished by its focus on terminal visualization, using a styling system to apply colors and prefixes to log entries for improved readability in consoles. It also includes a specialized adapter to convert standard library log calls into structured events by inferring severity levels from message prefixes.

The library manages metadata through contextual sub-loggers that attach persistent attributes and automatic source location information to entries. It supports multiple serialization formats, including JSON and logfmt, and provides source attribution by analyzing the call stack to identify the origin of log events.

The system integrates with the standard slog package via a custom handler to route structured logs through its formatting engine.

Features

  • Structured Logging - Implements structured logging by recording operational data as machine-readable key-value pairs.
  • Log Formatters - Provides pluggable formatters to serialize structured logs into multiple formats including JSON and logfmt.
  • Logfmt Serializers - Serializes log entries into key-value pairs following the logfmt standard to handle complex data types.
  • Terminal Output Stylers - Applies visual styles and color-coded escape sequences to log output for improved console readability.
  • Structured Logging Libraries - Provides a comprehensive toolkit for producing structured logs with key-value pairs and severity levels.
  • Persistent Log Context - Attaches persistent metadata fields to logger instances to ensure consistent context across all subsequent logs.
  • JSON Formats - Serializes log entries into machine-readable JSON and logfmt formats for observability tool compatibility.
  • Severity Level Filtering - Filters log messages based on a minimum severity threshold such as Info or Error.
  • Contextual Logging - Injects persistent metadata and source location information into log entries to enable system-wide tracing.
  • Log Configuration - Provides global settings for controlling log severity levels, time formats, and output prefixes.
  • Logger Hierarchies - Implements hierarchical logger structures where child loggers inherit metadata and attributes from their parents.
  • Contextual Logger Instances - Provides a logging system capable of creating child loggers that carry persistent, scoped metadata.
  • Structured Log Field Attachments - Allows adding structured key-value pairs to log entries to provide consistent context throughout an execution.
  • Log Level Visual Styling - Maps specific log levels to visual color profiles and formatting rules for improved terminal readability.
  • Log Metadata Injectors - Automatically injects constant fields, timestamps, and source location information into every emitted log entry.
  • Logfmt Serializers - Includes a dedicated serializer for converting structured log data into the logfmt standard.
  • Runtime Call-Stack Capturers - Analyzes the runtime call stack to bypass wrapper functions and identify the original source of a log event.
  • Standard Library Adapters - Wraps standard library logging interfaces to integrate them into a structured logging pipeline.
  • Logging Libraries - Provides adapters that convert standard library log calls into structured events to modernize legacy logging.
  • Adapter Patterns - Uses adapter patterns to bridge the gap between standard library logging and structured logging interfaces.
  • Custom Log Formatting - Supports converting structured log data into multiple interchangeable formats including text, JSON, and logfmt.
  • Source Location Capture - Automatically records the source file, line number, and function name for every emitted log entry.
  • Severity Inference Engines - Infers log severity levels from unstructured strings by matching message prefixes against defined patterns.
  • Component Identifiers - Allows prepending specific strings to log entries to identify which component emitted the message.
  • Logging Integrations - Implements a custom handler for the standard slog package to route structured logs through its formatting engine.

Star history

Star history chart for charmbracelet/logStar history chart for charmbracelet/log

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does charmbracelet/log do?

This is a structured logging library designed to produce logs using key-value pairs, severity levels, and machine-readable formats. It provides a toolkit for creating logs that are consistent for both human review and machine parsing.

What are the main features of charmbracelet/log?

The main features of charmbracelet/log are: Structured Logging, Log Formatters, Logfmt Serializers, Terminal Output Stylers, Structured Logging Libraries, Persistent Log Context, JSON Formats, Severity Level Filtering.

What are some open-source alternatives to charmbracelet/log?

Open-source alternatives to charmbracelet/log include: sirupsen/logrus — Logrus is a structured logging library for Go that produces machine-readable output using key-value pairs and JSON… winstonjs/winston — Winston is a versatile logging library for Node.js designed to record system events and metadata. It functions as a… hynek/structlog — structlog is a structured logging library for Python that treats log entries as dictionaries instead of strings. This… nlog/nlog — NLog is an open-source logging framework for .NET that functions as a structured logging library and log routing… seldaek/monolog — Monolog is a logging library that implements the PSR-3 standard to ensure interoperable log handling across PHP… serilog/serilog — Serilog is a structured logging library for .NET applications that records events as rich data objects instead of…

Open-source alternatives to Log

Similar open-source projects, ranked by how many features they share with Log.
  • sirupsen/logrussirupsen avatar

    sirupsen/logrus

    25,736View on GitHub↗

    Logrus is a structured logging library for Go that produces machine-readable output using key-value pairs and JSON formatting. It serves as a pluggable logging framework providing a thread-safe event logger with configurable mutex locking to manage concurrent writes across multiple goroutines. The project distinguishes itself through a pluggable hook system that routes log entries to external services or custom destinations. It also features a contextual logger capable of attaching persistent metadata and request-scoped fields to entries to improve traceability. The framework covers broad ob

    Gogologginglogrus
    View on GitHub↗25,736
  • winstonjs/winstonwinstonjs avatar

    winstonjs/winston

    24,478View on GitHub↗

    Winston is a versatile logging library for Node.js designed to record system events and metadata. It functions as a multi-transport log manager that routes data to various destinations and a structured log formatter that transforms entries into JSON or plain text. The project is distinguished by its pluggable transport architecture, which decouples the logging interface from delivery mechanisms. This allows for the creation of custom transport extensions and the use of hierarchical logger instances to inherit configurations while attaching persistent metadata to downstream messages. The libr

    JavaScript
    View on GitHub↗24,478
  • hynek/structloghynek avatar

    hynek/structlog

    4,835View on GitHub↗

    structlog is a structured logging library for Python that treats log entries as dictionaries instead of strings. This data-centric approach enables machine-readable output and precise data analysis by generating log entries as key-value pairs. It functions as both a standalone logging framework and a compatibility layer that adds structured capabilities to the Python standard library logging module. The library features a processor-pipeline architecture that passes log dictionaries through a sequence of functions to modify events or add metadata before final rendering. It includes a contextua

    Python
    View on GitHub↗4,835
  • nlog/nlogNLog avatar

    NLog/NLog

    6,542View on GitHub↗

    NLog is an open-source logging framework for .NET that functions as a structured logging library and log routing engine. It captures log events with named parameters as searchable data rather than plain text and directs these messages to various output destinations based on severity and source. The framework is designed as an extensible platform, supporting custom targets, layout renderers, and filters that can be loaded from external assemblies or defined in code. It features a dynamic configuration system that allows logging targets, rules, and layouts to be updated via XML or programmatic

    C#aotaot-compatiblec-sharp
    View on GitHub↗6,542
See all 30 alternatives to Log→