common

package
v0.0.0-...-1573b19 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogLevel

func GetLogLevel() string

GetLogLevel retrieves the log level from configuration and prints it to stdout.

func InitLogger

func InitLogger(logLevel string, options LoggerOptions) (*log.Helper, log.Logger)

InitLogger initializes the logger based on the provided log level

func IsNil

func IsNil(i interface{}) bool

IsNil checks if the given interface is nil or not

func ToPointer

func ToPointer[T any](v T) *T

ToPointer returns a pointer to the provided value of type T.

Types

type LoggerOptions

type LoggerOptions struct {
	ServiceName    string
	ServiceVersion string
}

LoggerOptions contains configuration options for logger initialization.

Jump to

Keyboard shortcuts

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