Update logging behavior

This commit is contained in:
Tom Wiesing 2022-12-01 12:42:04 +01:00
parent 3b78b06fff
commit 6f1ba24761
No known key found for this signature in database
28 changed files with 176 additions and 137 deletions

View file

@ -2,9 +2,10 @@ package control
import (
"context"
"fmt"
"io"
"net/http"
"github.com/FAU-CDI/wisski-distillery/pkg/logging"
)
// Server returns an http.Mux that implements the main server instance.
@ -18,7 +19,7 @@ func (control *Control) Server(ctx context.Context, progress io.Writer) (*http.S
// add all the servable routes!
for _, s := range control.Servables {
for _, route := range s.Routes() {
fmt.Fprintf(progress, "mounting %s\n", route)
logging.ProgressF(progress, ctx, "mounting %s\n", route)
handler, err := s.Handler(ctx, route, progress)
if err != nil {
return nil, err