/awesome-slog

Collection of log/slog related projects.

Primary LanguageMakefile

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.

  • slog-exp: Individual log files foe levels, Wrapping ReplaceAttr, displaying goroutine id, etc.
  • slog-multi: Chaining handlers (pipe, router, fanout, etc).
  • slog-sampling: Drop repetitive log entries.
  • slog-shim: Backward compatible slog support for Go <1.21.
  • sloggen: Generate various helpers.
  • sloglint: Ensure consistent code style.

⬆ 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.
  • slog-formatter: Common formatters for slog + helpers for building your own.
  • 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.

⬆ 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-context: Attach arbitrary key-value pairs to log records through context.

⬆ 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

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