logger

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 5 Imported by: 0

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) Driver

func (l *Logger) Driver() driver.Driver

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