ologgers

package
v0.0.0-...-0cd1013 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OLogger

type OLogger struct {
	Logger   otellog.Logger
	Ctx      context.Context
	Provider *sdklog.LoggerProvider
}

Object used to log to an OpenTelemetry instance

func New

func New(cfg *config.Config, opts OLoggerOptions) (*OLogger, error)

Create an OLogger instance

func (*OLogger) Log

func (o *OLogger) Log(i interface{})

Log any object

func (*OLogger) LogRecord

func (o *OLogger) LogRecord(r otellog.Record)

Emit a Record

func (*OLogger) Shutdown

func (o *OLogger) Shutdown(ctx context.Context) error

Shutdown flushes pending logs and shuts down the logger provider.

type OLoggerOptions

type OLoggerOptions struct {
	ServiceId   string
	ServiceName string
}

Options of an OLogger instance

Jump to

Keyboard shortcuts

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