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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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