Files
fn_registry/functions/infra/log_entry.go
T
egutierrez 1860cf2bc6 feat: tipos Logger, LogLevel y LogEntry para structured logging (infra)
Tipos base para las funciones de structured logging sobre log/slog:
- LogLevel: suma enum Debug/Info/Warn/Error
- Logger: wrapper producto con nivel, output, formato y fields contextuales
- LogEntry: modelo canonico JSON para tests y pipelines de logs

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 17:14:19 +02:00

13 lines
390 B
Go

package infra
import "time"
// LogEntry representa una entrada de log estructurada serializable a JSON.
// Se usa como modelo canonico para tests y para pipelines que procesan logs.
type LogEntry struct {
Timestamp time.Time `json:"timestamp"`
Level string `json:"level"`
Message string `json:"message"`
Fields map[string]any `json:"fields,omitempty"`
}