obs

package
v0.48.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(logger Logger, message string, kv ...any)

func Error

func Error(logger Logger, message string, kv ...any)

func Fail

func Fail(timer Timer, reason string, kv ...any)

func Info

func Info(logger Logger, message string, kv ...any)

func Log

func Log(logger Logger, level string, message string, fields Fields)

func NewCorrelationID

func NewCorrelationID() string

func Stop

func Stop(timer Timer, kv ...any)

func Warn

func Warn(logger Logger, message string, kv ...any)

Types

type Fields added in v0.17.2

type Fields = map[string]any

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