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
sirupsen avatar

sirupsen/logrus

0
View on GitHub↗
25,736 stars·2,281 forks·Go·MIT·17 views

Logrus

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 observability capabilities, including call site tracking for source code location, severity-based verbosity control, and the ability to redirect output from the standard library into a structured pipeline. It supports multiple output formats, such as JSON and plain text with ANSI color styling, and includes mechanisms for log data redaction and log-to-metric translation.

Performance is managed through memory buffer pooling and deferred log evaluation to reduce allocation overhead.

Features

  • Structured Logging - Records operational data as machine-readable key-value pairs for efficient search and analysis in Go.
  • Structured Logging Frameworks - Implements a structured logging framework that produces machine-readable key-value pairs and JSON output.
  • Log Formatters - Decouples log data from output representation using pluggable formatters for JSON and plain text.
  • Logging and Verbosity Tools - Sets a minimum severity threshold to determine which log messages are recorded and which are ignored.
  • Persistent Log Context - Creates logger entries with predefined fields that are automatically included in every subsequent log statement.
  • Custom Log Formatting - Allows the definition of custom layouts to convert log data between JSON and plain text formats.
  • Event Callbacks - Executes user-defined callback functions during log events to route data to external monitoring services.
  • Thread-Safe Logging - Ensures thread-safe logging across multiple goroutines using configurable mutex locking to prevent data corruption.
  • Application Observability - Tracks execution flows and system health by attaching request metadata and severity levels to log entries.
  • Log Severity Categorization - Assigns priority levels to logs to distinguish between operational noise, warnings, and critical errors.
  • Multi-Level Message Emission - Records events at various severity levels using an interface compatible with standard logging patterns.
  • Hierarchical Log Entries - Allows deriving new log entries from a parent to inherit existing fields while adding unique metadata.
  • Logger Hierarchies - Provides hierarchical logger instances that inherit persistent key-value pairs from parent loggers for contextual tracing.
  • Contextual Logger Instances - Attaches persistent metadata and request-scoped fields to entries to improve traceability and debugging.
  • Logging Pipelines - Routes application logs to external services or custom destinations via a pluggable hook system.
  • Request-Scoped Log Context - Links request-scoped metadata to log entries to track execution flows using unique trace identifiers.
  • Logging Frameworks - Implements a pluggable framework for extending log behavior via hooks that route entries to external destinations.
  • Automatic Field Injectors - Automatically adds custom fields to every log entry by intercepting the event before it is written.
  • Runtime Call-Stack Capturers - Inspects the execution stack at runtime to capture the filename and line number of the calling function.
  • Go - Captures precise call site information and error metadata in Go to accelerate the troubleshooting process.
  • Deferred Log Evaluation - Optimizes performance by executing log argument generation functions only when the active log level permits writing.
  • Standard Library Adapters - Implements compatibility layers that capture logs from the Go standard library and integrate them into a structured logging pipeline.
  • Memory Object Pools - Implements memory object pools to recycle byte buffers and minimize garbage collection overhead during log serialization.
  • Logging - Provides a pluggable hook system to execute custom logic or route logs to external services based on severity levels.
  • Call Site Capturers - Records the specific method and file location in the call stack to simplify the debugging process.
  • Application Log Redirection - Provides the ability to route log entries to different destinations such as the standard output stream or a file.
  • Monitoring Service Log Exporters - Forwards log events to external monitoring endpoints or third-party platforms through a pluggable hook system.
  • Error Logging Utilities - Integrates error objects as structured fields within log entries for improved error reporting and stack trace capture.
  • Plain Text Log Formatting - Converts structured entries into space-separated key-value pairs with customizable quoting and ANSI color coding.
  • Custom Log Writers - Ships custom writers that wrap standard output streams to route external library logs into the structured pipeline.
  • Logging - Structured logging library.
  • Monitoring and Logging - A structured logging library compatible with the standard logger.
  • Logging - Structured logging library.
  • Logging Frameworks - Structured logging library for Go.
  • Logging Libraries - Structured logger for Go applications.

Star history

Star history chart for sirupsen/logrusStar history chart for sirupsen/logrus

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

Open-source alternatives to Logrus

Similar open-source projects, ranked by how many features they share with Logrus.
  • 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
  • rs/zerologrs avatar

    rs/zerolog

    12,220View on GitHub↗

    Zerolog is a structured logging library for Go designed for high-performance event capture and observability. It focuses on generating machine-readable JSON output while minimizing memory overhead through zero-allocation buffer encoding and strongly-typed field validation. The library distinguishes itself by providing a chainable, context-aware interface that allows developers to bind trace identifiers and metadata directly to request lifecycles. It supports complex diagnostic workflows by enabling independent logger instances, custom output routing to multiple concurrent destinations, and ev

    Gogolangjsonlogging
    View on GitHub↗12,220
  • charmbracelet/logcharmbracelet avatar

    charmbracelet/log

    3,121View on GitHub↗

    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

    Gogolanglogging
    View on GitHub↗3,121
  • delgan/loguruDelgan avatar

    Delgan/loguru

    23,964View on GitHub↗

    Loguru is a Python logging library and thread-safe framework designed for recording system events and diagnostic messages. It functions as a structured logging tool that can serialize messages into JSON strings with metadata for automated parsing and analysis. The library includes a specialized exception tracker that captures unhandled crashes across main and background threads, rendering detailed stack traces that include local variable values. It further distinguishes itself through a unified routing pipeline that can intercept messages from the standard library logging module and dispatch

    Python
    View on GitHub↗23,964
See all 30 alternatives to Logrus→

Frequently asked questions

What does sirupsen/logrus do?

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.

What are the main features of sirupsen/logrus?

The main features of sirupsen/logrus are: Structured Logging, Structured Logging Frameworks, Log Formatters, Logging and Verbosity Tools, Persistent Log Context, Custom Log Formatting, Event Callbacks, Thread-Safe Logging.

What are some open-source alternatives to sirupsen/logrus?

Open-source alternatives to sirupsen/logrus include: winstonjs/winston — Winston is a versatile logging library for Node.js designed to record system events and metadata. It functions as a… rs/zerolog — Zerolog is a structured logging library for Go designed for high-performance event capture and observability. It… charmbracelet/log — This is a structured logging library designed to produce logs using key-value pairs, severity levels, and… delgan/loguru — Loguru is a Python logging library and thread-safe framework designed for recording system events and diagnostic… hynek/structlog — structlog is a structured logging library for Python that treats log entries as dictionaries instead of strings. This… unjs/consola — Consola is a diagnostic logging utility and log output manager that provides a unified interface for Node.js and web…