Skip to content

Commit

Permalink
Merge pull request #1402 from influxdata/md-issue#1399
Browse files Browse the repository at this point in the history
Add http server error logger
  • Loading branch information
desa authored May 30, 2017
2 parents 6f335d0 + 61286ed commit a76077c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Bugfixes

- [#1402](https://github.com/influxdata/kapacitor/pull/1402): Fix http server error logging.

## v1.3.0 [2017-05-22]

### Release Notes
Expand Down
7 changes: 5 additions & 2 deletions services/httpd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ type Service struct {

Handler *Handler

logger *log.Logger
logger *log.Logger
httpServerLogger *log.Logger
}

func NewService(c Config, hostname string, l *log.Logger, li logging.Interface) *Service {
Expand Down Expand Up @@ -68,7 +69,8 @@ func NewService(c Config, hostname string, l *log.Logger, li logging.Interface)
li,
c.SharedSecret,
),
logger: l,
logger: l,
httpServerLogger: li.NewStaticLevelLogger("[httpd]", log.LstdFlags, logging.ERROR),
}
return s
}
Expand Down Expand Up @@ -110,6 +112,7 @@ func (s *Service) Open() error {
s.server = &http.Server{
Handler: s.Handler,
ConnState: s.connStateHandler,
ErrorLog: s.httpServerLogger,
}

s.new = make(chan net.Conn)
Expand Down

0 comments on commit a76077c

Please sign in to comment.