service

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(ctx context.Context, serviceName string) (internalLogger *zap.Logger, appLogger *zap.Logger, cleanup func())

InitLogger initializes a logger with OTel and returns the internal and external logger instances. It also returns a cleanup function to close the logger resources. serviceName is the mdai service name of the service in the format "github.com/mydecisive/service-name" internalLogger is for logging to stdout only, while appLogger is for logging through OTEL SDK. Use LOG_LEVEL environment variable to change the log level.

Types

type ShutdownFunc

type ShutdownFunc func(context.Context) error

type ZapErrorHandler

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

func (ZapErrorHandler) Handle

func (errorHandler ZapErrorHandler) Handle(err error)

Jump to

Keyboard shortcuts

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