obs

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(logger Logger, message string, fields map[string]any)

func Error

func Error(logger Logger, message string, fields map[string]any)

func Fail

func Fail(timer Timer, reason string, fields map[string]any)

func Info

func Info(logger Logger, message string, fields map[string]any)

func Log

func Log(logger Logger, level string, message string, fields map[string]any)

func NewCorrelationID

func NewCorrelationID() string

func Stop

func Stop(timer Timer, fields map[string]any)

func Warn

func Warn(logger Logger, message string, fields map[string]any)

Types

type Logger

type Logger struct {
	Service       string
	Environment   string
	Component     string
	CorrelationID string
}

func New

func New(service string, environment string) Logger

type Timer

type Timer struct {
	Logger    Logger
	Operation string
	StartedAt time.Time
}

func Start

func Start(logger Logger, operation string) Timer

Jump to

Keyboard shortcuts

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