outputs

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupOtelFormat

func SetupOtelFormat(defaultConfig loggergoTypes.Config) (slog.Handler, error)

setupOtelFormat sets up a slog.Handler for OpenTelemetry format. It merges the default resource with the service name attribute, creates a stdoutlog exporter, and sets up a log processor and logger provider with the merged resource and exporter. Returns the handler and any error encountered.

func SetupPlainFormat

func SetupPlainFormat(opts slog.HandlerOptions, defaultConfig types.Config) (slog.Handler, error)

setupPlainFormat sets up a slog.Handler for plain format. If defaultConfig.DevMode is true, it checks the defaultConfig.DevFlavor and sets up the appropriate handler based on the flavor. Returns the handler and any error encountered.

Types

This section is empty.

Jump to

Keyboard shortcuts

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