logger

package
v0.2.22 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface added in v0.2.14

type Interface interface {
	Error(context.Context, string, ...interface{})
	GetMode() LogLevel
	GetStackLevel() int
	Info(context.Context, string, ...interface{})
	SetMode(LogLevel) Interface
	SetStackLevel(level int)
	Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)
	Warn(context.Context, string, ...interface{})
}

Interface is a logger interface

func NewLogger

func NewLogger(debugging bool, stackLevel int) Interface

NewLogger will return a basic logger interface

type LogLevel added in v0.2.14

type LogLevel int

LogLevel is the log level

const (
	// Silent silent log level
	Silent LogLevel = iota + 1

	// Error error log level
	Error

	// Warn warn log level
	Warn

	// Info info log level
	Info
)

Jump to

Keyboard shortcuts

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