Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Change logserver to only print an error log if it fails (#1944)
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Linville <grant@acorn.io>
  • Loading branch information
g-linville committed Jul 19, 2023
1 parent 58adf56 commit f818cc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/logserver/logserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ func (s *Server) Start() {
// ListenAndServe is used to setup handlers and
// start listening on the specified location
func (s *Server) ListenAndServe() error {
logrus.Infof("Listening on %s", s.SocketLocation)
server := http.Server{}
http.HandleFunc("/v1/loglevel", s.loglevel)
socketListener, err := net.Listen("unix", s.SocketLocation)
if err != nil {
logrus.Errorf("Failed to start logserver: %v", err)
return err
}
return server.Serve(socketListener)
Expand Down

0 comments on commit f818cc6

Please sign in to comment.