Skip to content

Commit

Permalink
Merge pull request #74 from mutablelogic/v4
Browse files Browse the repository at this point in the history
Check for logger
  • Loading branch information
djthorpe authored Jul 29, 2024
2 parents 81875c6 + cb51a2f commit 69cbaad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/httpserver/httpserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ func (self *httpserver) Run(ctx context.Context) error {
}()

// Log the server is running
provider.Logger(ctx).Printf(ctx, "Starting %v server on %q", self.Type(), self.Addr())
if log := provider.Logger(ctx); log != nil {
log.Printf(ctx, "Starting %v server on %q", self.Type(), self.Addr())
}

// Run server in foreground, cancel when done
if err := self.runInForeground(); err != nil && !errors.Is(err, http.ErrServerClosed) {
Expand Down

0 comments on commit 69cbaad

Please sign in to comment.