log

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Storage   = "stor_name"
	Object    = "obj_name"
	ObjectVer = "obj_ver"
	Bucket    = "bucket"
	Method    = "method"

	TraceID = "trace_id"
)

Variables

This section is empty.

Functions

func CreateLogger

func CreateLogger(cfg *Config, app, appID string) zerolog.Logger

func GetLogger

func GetLogger(cfg *Config, app, appID string) zerolog.Logger

func HttpMiddleware

func HttpMiddleware(cfg *Config, app, appID string, flow xctx.Flow) func(next http.Handler) http.Handler

func StartNew

func StartNew(from context.Context) (context.Context, context.CancelFunc)

func StreamInterceptor

func StreamInterceptor(cfg *Config, app, appID string) grpc.StreamServerInterceptor

func UnaryInterceptor

func UnaryInterceptor(cfg *Config, app, appID string) grpc.UnaryServerInterceptor

func WithBucket

func WithBucket(ctx context.Context, bucket string) context.Context

func WithFlow

func WithFlow(ctx context.Context, f xctx.Flow) context.Context

func WithMethod

func WithMethod(ctx context.Context, method s3.Method) context.Context

func WithObjName

func WithObjName(ctx context.Context, objName string) context.Context

func WithObjVer added in v0.7.0

func WithObjVer(ctx context.Context, objVer string) context.Context

func WithStorType added in v0.7.0

func WithStorType(ctx context.Context, in dom.StorageType) context.Context

func WithStorage

func WithStorage(ctx context.Context, storage string) context.Context

func WithSwiftMethod added in v0.7.0

func WithSwiftMethod(ctx context.Context, method swift.Method) context.Context

func WithTraceID

func WithTraceID(ctx context.Context, t string) context.Context

func WithUser

func WithUser(ctx context.Context, u string) context.Context

func WorkerMiddleware

func WorkerMiddleware(cfg *Config, app, appID string) asynq.MiddlewareFunc

Types

type Config

type Config struct {
	Level string `yaml:"level"`
	Json  bool   `yaml:"json"`
}

type Logger

type Logger struct{}

func NewStdLogger

func NewStdLogger() *Logger

func (*Logger) Debug

func (logger *Logger) Debug(args ...interface{})

func (*Logger) Error

func (logger *Logger) Error(args ...interface{})

func (*Logger) Fatal

func (logger *Logger) Fatal(args ...interface{})

func (*Logger) Info

func (logger *Logger) Info(args ...interface{})

func (*Logger) Printf

func (logger *Logger) Printf(ctx context.Context, format string, v ...interface{})

func (*Logger) Warn

func (logger *Logger) Warn(args ...interface{})

Jump to

Keyboard shortcuts

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