logger

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 4 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

This section is empty.

Types

type Logger

type Logger struct {
	client.Client
	// contains filtered or unexported fields
}

Logger decorates any dbClient.Client with query logging. All database operations are logged at DEBUG level, showing the query and its arguments. This is useful for debugging and monitoring.

func NewLogger

func NewLogger(client client.Client, logger logger.Logger) *Logger

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) DriverName added in v0.0.4

func (l *Logger) DriverName() string

func (*Logger) Exec

func (l *Logger) Exec(s string, i ...interface{}) (sql.Result, error)

func (*Logger) ExecContext

func (l *Logger) ExecContext(ctx context.Context, s string, i ...interface{}) (sql.Result, error)

func (*Logger) Query

func (l *Logger) Query(s string, i ...interface{}) (*sql.Rows, error)

func (*Logger) QueryContext

func (l *Logger) QueryContext(ctx context.Context, s string, i ...interface{}) (*sql.Rows, error)

func (*Logger) QueryRow

func (l *Logger) QueryRow(s string, i ...interface{}) *sql.Row

func (*Logger) QueryRowContext

func (l *Logger) QueryRowContext(ctx context.Context, s string, i ...interface{}) *sql.Row

func (*Logger) SQL

func (l *Logger) SQL() *sql.DB

Jump to

Keyboard shortcuts

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