logging

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 11 Imported by: 0

README

logging

This library is developed for intern use. It provides a setup for a structured logging with an additional Gin middleware for logging to provide consistent logging between Gin logs and "normal" application logs.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler() *Handler

func (*Handler) Enabled

func (m *Handler) Enabled(ctx context.Context, level slog.Level) bool

func (*Handler) GinMiddleware

func (m *Handler) GinMiddleware() gin.HandlerFunc

func (*Handler) Handle

func (m *Handler) Handle(ctx context.Context, record slog.Record) error

func (*Handler) Setup

func (m *Handler) Setup()

func (*Handler) WithAttrs

func (m *Handler) WithAttrs(attrs []slog.Attr) slog.Handler

func (*Handler) WithGroup

func (m *Handler) WithGroup(name string) slog.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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