logging

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoLogger = NoLog{}

NoLogger is a default no-op logger instance

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Warn(format string, args ...interface{})
	Error(format string, args ...interface{})
	Fatal(format string, args ...interface{})
}

Logger defines the logging interface used by database packages

func NewZapAdapter

func NewZapAdapter(logger *zap.Logger) Logger

NewZapAdapter creates a new ZapAdapter

type NoLog

type NoLog struct{}

NoLog is a no-op logger implementation

func (NoLog) Debug

func (NoLog) Debug(format string, args ...interface{})

func (NoLog) Error

func (NoLog) Error(format string, args ...interface{})

func (NoLog) Fatal

func (NoLog) Fatal(format string, args ...interface{})

func (NoLog) Info

func (NoLog) Info(format string, args ...interface{})

func (NoLog) Warn

func (NoLog) Warn(format string, args ...interface{})

type ZapAdapter

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

ZapAdapter adapts zap.Logger to the database Logger interface

func (*ZapAdapter) Debug

func (z *ZapAdapter) Debug(format string, args ...interface{})

func (*ZapAdapter) Error

func (z *ZapAdapter) Error(format string, args ...interface{})

func (*ZapAdapter) Fatal

func (z *ZapAdapter) Fatal(format string, args ...interface{})

func (*ZapAdapter) Info

func (z *ZapAdapter) Info(format string, args ...interface{})

func (*ZapAdapter) Warn

func (z *ZapAdapter) Warn(format string, args ...interface{})

Jump to

Keyboard shortcuts

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