handlers

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingHandler

func LoggingHandler(log fancylog.FancyHttpLog, out io.Writer, h http.Handler) http.Handler

func StreamClientInterceptor added in v0.0.6

func StreamClientInterceptor(l fancylog.FancyLogger, logLevel fancylog.Level, logFunc func(ctx context.Context) map[string]interface{}, ignoreMethods ...string) grpc.StreamClientInterceptor

func StreamServerInterceptor added in v0.0.6

func StreamServerInterceptor(l fancylog.FancyLogger, logLevel fancylog.Level, logFunc func(ctx context.Context) map[string]interface{}, ignoreMethods ...string) grpc.StreamServerInterceptor

func UnaryClientInterceptor added in v0.0.6

func UnaryClientInterceptor(l fancylog.FancyLogger, logLevel fancylog.Level, logFunc func(ctx context.Context) map[string]interface{}, ignoreMethods ...string) grpc.UnaryClientInterceptor

func UnaryServerInterceptor added in v0.0.6

func UnaryServerInterceptor(l fancylog.FancyLogger, logLevel fancylog.Level, logFunc func(ctx context.Context) map[string]any, ignoreMethods []string) grpc.UnaryServerInterceptor

Types

type FancyPGLogger added in v0.0.7

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

func NewFancyPGLogger added in v0.0.7

func NewFancyPGLogger(l fancylog.FancyLogger) *FancyPGLogger

func (*FancyPGLogger) Crit added in v0.0.7

func (l *FancyPGLogger) Crit(msg string, ctx ...interface{})

func (*FancyPGLogger) Debug added in v0.0.7

func (l *FancyPGLogger) Debug(msg string, ctx ...interface{})

func (*FancyPGLogger) Error added in v0.0.7

func (l *FancyPGLogger) Error(msg string, ctx ...interface{})

func (*FancyPGLogger) Info added in v0.0.7

func (l *FancyPGLogger) Info(msg string, ctx ...interface{})

func (*FancyPGLogger) Log added in v0.0.7

func (l *FancyPGLogger) Log(ctx context.Context, level pgx.LogLevel, msg string, data map[string]interface{})

func (*FancyPGLogger) SetIgnoreStmtPrefixes added in v0.0.7

func (l *FancyPGLogger) SetIgnoreStmtPrefixes(p []IgnoreStmtPrefix)

func (*FancyPGLogger) Warn added in v0.0.7

func (l *FancyPGLogger) Warn(msg string, ctx ...interface{})

type Ignore added in v0.0.7

type Ignore struct {
}

type IgnoreStmtPrefix added in v0.0.7

type IgnoreStmtPrefix struct {
	Text       string
	IgnoreCase bool
}

func (IgnoreStmtPrefix) ContainsPrefix added in v0.0.7

func (i IgnoreStmtPrefix) ContainsPrefix(sql string) bool

type PgLogger added in v0.0.7

type PgLogger interface {
	Debug(msg string, ctx ...interface{})
	Info(msg string, ctx ...interface{})
	Warn(msg string, ctx ...interface{})
	Error(msg string, ctx ...interface{})
	Crit(msg string, ctx ...interface{})
}

Jump to

Keyboard shortcuts

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