feat: add observability Info/Warn/Error helpers

This commit is contained in:
2026-05-26 15:56:10 +02:00
parent e99070c6d4
commit 8daad49061
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
package observability
// Small helpers to keep logging consistent and low-friction across the codebase.
func Info(event string, component string, message string, fields map[string]any) {
LogJSON(LogLevelInfo, event, component, message, fields, nil)
}
func Warn(event string, component string, message string, fields map[string]any, err error) {
LogJSON(LogLevelWarn, event, component, message, fields, err)
}
func Error(event string, component string, message string, fields map[string]any, err error) {
LogJSON(LogLevelError, event, component, message, fields, err)
}