Route console diagnostics and stage progress through native reporting
This commit is contained in:
22
internal/stage/reporting.go
Normal file
22
internal/stage/reporting.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package stage
|
||||
|
||||
func (env *Env) Info(message string, fields ...any) {
|
||||
if env != nil && env.Reporter != nil {
|
||||
env.Reporter.Info(message, fields...)
|
||||
}
|
||||
}
|
||||
func (env *Env) Warn(message string, fields ...any) {
|
||||
if env != nil && env.Reporter != nil {
|
||||
env.Reporter.Warn(message, fields...)
|
||||
}
|
||||
}
|
||||
func (env *Env) Debug(message string, fields ...any) {
|
||||
if env != nil && env.Reporter != nil {
|
||||
env.Reporter.Debug(message, fields...)
|
||||
}
|
||||
}
|
||||
func (env *Env) Progress(message string, fields ...any) {
|
||||
if env != nil && env.Reporter != nil {
|
||||
env.Reporter.Progress(message, fields...)
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package stage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
@@ -15,6 +14,7 @@ import (
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/whisperx"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/logging"
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/manifest"
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ type Env struct {
|
||||
EffectiveArtifacts artifacts.EffectiveArtifactSet
|
||||
ArtifactStore artifacts.Store
|
||||
ManifestStore manifest.Store
|
||||
Logger *slog.Logger
|
||||
Reporter logging.Reporter
|
||||
Force bool
|
||||
|
||||
WhisperX whisperx.Client
|
||||
|
||||
Reference in New Issue
Block a user