Skip to content

Commit

Permalink
add server started log with server url
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Sep 12, 2023
1 parent 618d04b commit 282a368
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/serve/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var Command = &cobra.Command{
}
router := s.Router()
s.Bind(router)
s.Serve()
s.serve()
s.Wait()
return nil
})
Expand Down
6 changes: 6 additions & 0 deletions cmd/serve/s3/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ func newServer(ctx context.Context, f fs.Fs, opt *Options) (s *Server, err error
func (w *Server) Bind(router chi.Router) {
router.Handle("/*", w.handler)
}

func (w *Server) serve() error {
w.Serve()
fs.Logf(w.f, "Starting s3 server on %s", w.URLs())
return nil
}

0 comments on commit 282a368

Please sign in to comment.