tlog

package
Version: v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DLTagUndefined = " _undef"

DLTagUndefined ...

View Source
const DebugTag = " fdebug"

DebugTag ...

Variables

View Source
var NewTracer = func(data map[string]string) *tracer {
	return &tracer{data: data}
}

Functions

func Init

func Init()

Init Init

func TraceContext added in v1.3.4

func TraceContext(ctx context.Context, t Tracer) context.Context

Types

type ILog

type ILog interface {
	Enable(level zapcore.Level) bool
	Debugf(ctx context.Context, tag string, format string, args ...interface{})
	Infof(ctx context.Context, tag string, format string, args ...interface{})
	Warnf(ctx context.Context, tag string, format string, args ...interface{})
	Errorf(ctx context.Context, tag string, format string, args ...interface{})
	Fatalf(ctx context.Context, tag string, format string, args ...interface{})
}

ILog log interface

var Handler ILog

Handler zapLog

type TLog

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

TLog ...

func NewTLog

func NewTLog(log *zap.Logger) *TLog

NewTLog ...

func (*TLog) Debugf

func (tl *TLog) Debugf(ctx context.Context, tag string, format string, args ...interface{})

Debugf ...

func (*TLog) Enable added in v1.3.4

func (tl *TLog) Enable(level zapcore.Level) bool

Enable ...

func (*TLog) Errorf

func (tl *TLog) Errorf(ctx context.Context, tag string, format string, args ...interface{})

Errorf ...

func (*TLog) Fatalf

func (tl *TLog) Fatalf(ctx context.Context, tag string, format string, args ...interface{})

Fatalf ...

func (*TLog) Infof

func (tl *TLog) Infof(ctx context.Context, tag string, format string, args ...interface{})

Infof ...

func (*TLog) Warnf

func (tl *TLog) Warnf(ctx context.Context, tag string, format string, args ...interface{})

Warnf ...

type Tracer added in v1.3.4

type Tracer interface {
	Format() string
}

Source Files

Jump to

Keyboard shortcuts

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