logging

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoLogger

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

GoLogger wraps the builtin log.Logger into our own Logger

func NewGoLogger

func NewGoLogger(l *log.Logger) *GoLogger

NewGoLogger returns a GoLogger wrapping the passed log.Logger

func (*GoLogger) Crit

func (g *GoLogger) Crit(msg string, ctx ...interface{})

Crit implements Logger

func (*GoLogger) Debug

func (g *GoLogger) Debug(msg string, ctx ...interface{})

Debug implements Logger

func (*GoLogger) Error

func (g *GoLogger) Error(msg string, ctx ...interface{})

Error implements Logger

func (*GoLogger) Info

func (g *GoLogger) Info(msg string, ctx ...interface{})

Info implements Logger

func (*GoLogger) Warn

func (g *GoLogger) Warn(msg string, ctx ...interface{})

Warn implements Logger

type GoTestingLogger added in v0.1.16

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

GoTestingLogger wraps the builtin log.Logger into our own Logger

func NewGoTestingLoggerr added in v0.1.16

func NewGoTestingLoggerr(t *testing.T) *GoTestingLogger

NewGoTestingLoggerr returns a GoTestingLogger wrapping the passed testing.T.Log()

func (*GoTestingLogger) Crit added in v0.1.16

func (g *GoTestingLogger) Crit(msg string, ctx ...interface{})

Crit implements Logger

func (*GoTestingLogger) Debug added in v0.1.16

func (g *GoTestingLogger) Debug(msg string, ctx ...interface{})

Debug implements Logger

func (*GoTestingLogger) Error added in v0.1.16

func (g *GoTestingLogger) Error(msg string, ctx ...interface{})

Error implements Logger

func (*GoTestingLogger) Info added in v0.1.16

func (g *GoTestingLogger) Info(msg string, ctx ...interface{})

Info implements Logger

func (*GoTestingLogger) Warn added in v0.1.16

func (g *GoTestingLogger) Warn(msg string, ctx ...interface{})

Warn implements Logger

type Logger

type Logger 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{})
}

Logger provides a seemingly sane logging interface.

type PgxLogAdapter

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

PgxLogAdapter wraps anything that satisfies Logger into pgx.Logger

func NewPgxLogAdapter

func NewPgxLogAdapter(l Logger) *PgxLogAdapter

NewPgxLogAdapter returns a PgxLogAdapter wrapping the passed Logger.

func (*PgxLogAdapter) Log

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

Log Satisfies pgx.Logger

Jump to

Keyboard shortcuts

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