Skip to content

Commit

Permalink
fix: ensure default logger is used when none is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
ladydascalie committed May 13, 2022
1 parent 27165e1 commit 143998a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flexhttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package flexhttp

import (
"context"
"log"
"net"
"net/http"
"os"
"time"
)

Expand Down Expand Up @@ -67,7 +69,10 @@ func New(httpServer *http.Server, options ...Option) *Server {
httpServer.IdleTimeout = DefaultHTTPServer.IdleTimeout
}

server := &Server{Server: httpServer}
server := &Server{
Server: httpServer,
logger: log.New(os.Stdout, "flexhttp: ", log.LstdFlags),
}

for _, opt := range options {
opt(server)
Expand Down

0 comments on commit 143998a

Please sign in to comment.