dblogger

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: LGPL-2.1 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContextGormLogger

func GetContextGormLogger(ctx context.Context) *threadsafe.SimpleSafeSlice[string]

GetContextGormLogger takes a context as input and returns a pointer to a SimpleSafeSlice of strings

func New

func New() *logger

New creates a new logger with default config

func NewConfig

func NewConfig(h slog.Handler) *config

NewConfig creates a new config with the given non-nil slog.Handler

func NewWithConfig

func NewWithConfig(config *config) *logger

NewWithConfig creates a new logger with given config

func WithContextGormLogger

func WithContextGormLogger(ctx context.Context, w *threadsafe.SimpleSafeSlice[string]) context.Context

WithContextGormLogger takes a context and threadsafe slice (string) as inputs and returns a new context with a value

Types

type LogType

type LogType int

LogType defines log type

const (
	Debug LogType = iota
	Info
	Warning
	Error
)

custom

Jump to

Keyboard shortcuts

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