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 ZapErrorHandler ¶
type ZapErrorHandler struct {
// contains filtered or unexported fields
}
func (ZapErrorHandler) Handle ¶
func (errorHandler ZapErrorHandler) Handle(err error)
Click to show internal directories.
Click to hide internal directories.