Skip to content

Commit

Permalink
fix logging using echo instance
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarreira committed May 16, 2022
1 parent 16e7c81 commit 1e45f5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/purge/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/web/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 1e45f5e

Please sign in to comment.