log

package
v0.0.0-...-22bb4a0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CriticalObj

func CriticalObj(ctx context.Context, label string, obj interface{})

func Criticalf

func Criticalf(ctx context.Context, format string, a ...interface{})

func DebugObj

func DebugObj(ctx context.Context, label string, obj interface{})

func Debugf

func Debugf(ctx context.Context, format string, a ...interface{})

func ErrorObj

func ErrorObj(ctx context.Context, label string, obj interface{})

func Errorf

func Errorf(ctx context.Context, format string, a ...interface{})

func InfoObj

func InfoObj(ctx context.Context, label string, obj interface{})

func Infof

func Infof(ctx context.Context, format string, a ...interface{})

func SetGCPLogger

func SetGCPLogger(projectID, label string) func(*gin.Context)

SetGCPLogger is middleware to set logger with trace in the context. In this middleware, projectID is required. If you don't set projectID, this middleware panics.

func SetSpanContext

func SetSpanContext(r *http.Request, label string) (context.Context, func())

func WarningObj

func WarningObj(ctx context.Context, label string, obj interface{})

func Warningf

func Warningf(ctx context.Context, format string, a ...interface{})

Types

type Frame

type Frame uintptr

type LogLevel

type LogLevel int
const (
	LogLevelDebug LogLevel = iota
	LogLevelInfo
	LogLevelWarn
	LogLevelError
	LogLevelCritical
)

type SpanContext

type SpanContext struct {
	SpanID  string
	TraceID string
}

func GetSpanContext

func GetSpanContext(ctx context.Context) SpanContext

type StackTrace

type StackTrace []Frame

func (*StackTrace) String

func (st *StackTrace) String() string

Jump to

Keyboard shortcuts

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