log

package
v0.0.0-...-677e9b2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbErr

func DbErr(err error) bool

func DbErrValid

func DbErrValid(err error) (bool, bool)

func DbTxCommit

func DbTxCommit(ctx context.Context, tx *pgxpool.Tx) bool

func DbTxErr

func DbTxErr(ctx context.Context, tx *pgxpool.Tx, err error) bool

func DbTxRollback

func DbTxRollback(ctx context.Context, tx *pgxpool.Tx)

func Debug

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

func IsDbErr

func IsDbErr(err error) bool

func LogClose

func LogClose(ct context.Context, wg *sync.WaitGroup)

обработка завершения работы приложения

func LogErr

func LogErr(err error)

func LogMsg

func LogMsg(msg string) *dbLog

func NewLog

func NewLog(cfg *config.Loger, pdb *pgxpool.Pool) error

Types

type Logger

type Logger struct {
	Ctx    context.Context
	Cancel context.CancelFunc
	ChData chan *dbLog
	ChL    chan int

	Closer bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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