Skip to content
Proyek

Tentang

Collection of log/slog related projects.

Pembelajaran dan pendidikan

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
0
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Awesome slog

Collection of log/slog related projects.

Do you have something to add? Please read the contributing guide and open a pull request.

Contents

General

General purpose handlers and integrations.

  • dynamic-level-handler: Wrapper for slog.Handler that supports level override for concrete logger.
  • slog-exp: Individual log files for levels, Wrapping ReplaceAttr, displaying goroutine id, etc.
  • slog-handler-override: A slog.Handler wrapper that allows runtime override of any handler's log level.
  • slog-multi: Chaining handlers (pipe, router, fanout, etc).
  • slog-sampling: Drop repetitive log entries.
  • slog-shim: Backward compatible slog support for Go <1.21.
  • slogbuffer: Buffer log records until real handler is defined.
  • sloggen: Generate various helpers.
  • sloglint: Ensure consistent code style.
  • slogscope: Package based log levels for more fine grained control over logging behavior in large project.

⬆ back to top

Formatting

Record and output formatters.

  • console-slog: Handler that prints colorized logs, similar to zerolog's console writer output without sacrificing performances.
  • devslog: Format logs for development.
  • golog: Development, discard and production handlers with sensible formatting.
  • slog-formatter: Common formatters for slog + helpers for building your own.
  • slogcolor: Color handler for log/slog.
  • slogor: A colorful slog handler.
  • slogpfx: Easily prefix your log messages with attributes from the log record.
  • tint: Handler that writes tinted logs.
  • zlog: Handler that writes beautiful, human readable logs.
  • zlog: Human-friendly output like zap development, json structured logging with more features for slog.

⬆ back to top

Enrichment

Handlers enriching log records.

  • masq: Redact sensitive data in logs.
  • otelslog: Handler attaching OpenTelemetry trace and resource details to logs.
  • slog-aws-lambda: Handler for AWS Lambda Functions.
  • slog-context: Attach arbitrary key-value pairs to log records through context.
  • slog-otel: Correlation between slog log records and Open-Telemetry traces.

⬆ back to top

Log forwarding

Handlers forwarding logs.

⬆ back to top

Adapters

Adapters for other logging libraries.

⬆ back to top

Integrations

log/slog integrations into third-party components.

⬆ back to top

Testing

Testing utilities for log/slog.

  • slogassert: slog handler for testing slog code logs expected results.
  • slogt: Bridge between Go testing.T and log/slog.

⬆ back to top

Resources

Other resources about log/slog.

⬆ back to top

Blog posts

Blog posts about log/slog.

⬆ back to top

Creating slog

Resources documenting the creation of log/slog.

⬆ back to top

Jelajahi proyek terkait

Memuat…