diff --git a/internal/purge/api.go b/internal/purge/api.go index 3ae085f2c..6e8fb19a8 100644 --- a/internal/purge/api.go +++ b/internal/purge/api.go @@ -63,10 +63,10 @@ func (p *PurgeAPI) Start() error { p.Unlock() go p.handleSignals() if err := p.startServer(); err != http.ErrServerClosed { - fmt.Printf("problem to start the webserver: %+v", err) + p.e.Logger.Errorf("problem to start the webserver: %+v", err) return err } - fmt.Println("Shutting down the webserver...") + p.e.Logger.Info("Shutting down the webserver...") return nil } diff --git a/pkg/web/api.go b/pkg/web/api.go index c908eea9a..5be3a1312 100644 --- a/pkg/web/api.go +++ b/pkg/web/api.go @@ -86,10 +86,10 @@ func (a *Api) Start() error { a.Unlock() go a.handleSignals() if err := a.startServer(); err != http.ErrServerClosed { - fmt.Printf("problem to start the webserver: %+v", err) + a.e.Logger.Errorf("problem to start the webserver: %+v", err) return err } - fmt.Println("Shutting down the webserver...") + a.e.Logger.Info("Shutting down the webserver...") return nil } @@ -99,10 +99,10 @@ func (a *Api) StartWithOptions(options APIServerStartOptions) error { a.Unlock() go a.handleSignals() if err := a.startServerWithOptions(options); err != http.ErrServerClosed { - fmt.Printf("problem to start the webserver: %+v", err) + a.e.Logger.Errorf("problem to start the webserver: %+v", err) return err } - fmt.Println("Shutting down the webserver...") + a.e.Logger.Info("Shutting down the webserver...") return nil }