logger

package
v0.0.0-...-cbc0f95 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger *log.Logger

	LogTimeFormat string
)

Functions

func EndGrpcTrace

func EndGrpcTrace(tctx *TraceContext, startTime time.Time, statusCode int64, err string)

func EndTrace

func EndTrace(tctx *TraceContext, startTime time.Time, err error, depth int)

func Error

func Error(tctx *TraceContext, err error, args ...interface{})

func Errorf

func Errorf(tctx *TraceContext, err error, format string, args ...interface{})

func Fatal

func Fatal(tctx *TraceContext, args ...interface{})

func Fatalf

func Fatalf(tctx *TraceContext, format string, args ...interface{})

func Info

func Info(tctx *TraceContext, args ...interface{})

func Infof

func Infof(tctx *TraceContext, format string, args ...interface{})

func InitLogger

func InitLogger(baseConf *base_config.Config)

func StartTrace

func StartTrace(tctx *TraceContext) time.Time

func StdoutFatal

func StdoutFatal(args ...interface{})

func StdoutFatalf

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

func StdoutInfo

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

func StdoutInfof

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

func Warning

func Warning(tctx *TraceContext, args ...interface{})

func Warningf

func Warningf(tctx *TraceContext, format string, args ...interface{})

Types

type TraceContext

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

func NewTraceContext

func NewTraceContext(host string, app string) *TraceContext

func NewTraceContextWithTraceId

func NewTraceContextWithTraceId(traceId string, host string, app string) *TraceContext

func (*TraceContext) GetTimeout

func (tctx *TraceContext) GetTimeout() int

func (*TraceContext) GetTraceId

func (tctx *TraceContext) GetTraceId() string

func (*TraceContext) ResetMetadata

func (tctx *TraceContext) ResetMetadata()

func (*TraceContext) SetMetadata

func (tctx *TraceContext) SetMetadata(data map[string]string)

func (*TraceContext) SetTimeout

func (tctx *TraceContext) SetTimeout(timeout int)

Jump to

Keyboard shortcuts

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