Route console diagnostics and stage progress through native reporting

This commit is contained in:
2026-11-20 05:59:09 +00:00
parent c7a5ff316d
commit c523def852
23 changed files with 309 additions and 76 deletions

View File

@@ -1,17 +1,10 @@
package logging
import (
"io"
"log/slog"
"os"
)
// NewLogger creates a text slog logger.
func NewLogger(out io.Writer, level slog.Level) *slog.Logger {
if out == nil {
out = os.Stderr
}
handler := slog.NewTextHandler(out, &slog.HandlerOptions{Level: level})
return slog.New(handler)
// Reporter receives operation diagnostics and work progress. Implementations own
// delivery and visibility; reporting does not change domain execution policy.
type Reporter interface {
Info(message string, fields ...any)
Warn(message string, fields ...any)
Debug(message string, fields ...any)
Progress(message string, fields ...any)
}