slog

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package slog provides logging middleware using log/slog.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(opts ...Option) xkafka.MiddlewareFunc

LoggingMiddleware is a middleware that logs messages using log/slog.

Types

type Level

type Level slog.Level

Level sets the log level to be used.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is a configuration option for the logging middleware.

func Logger

func Logger(logger *slog.Logger) Option

Logger sets a custom logger to be used. slog.Default() is used by default.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL