mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-08 14:10:05 +00:00
Add error log to http server
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
b0ff38946d
commit
f42de6e8a9
1 changed files with 3 additions and 1 deletions
4
main.go
4
main.go
|
@ -5,6 +5,8 @@ package main
|
|||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func getHTTPClient(ctx context.Context) *http.Client {
|
||||
|
@ -17,5 +19,5 @@ func getContext(r *http.Request) context.Context {
|
|||
|
||||
func main() {
|
||||
initializeStorage()
|
||||
http.ListenAndServe(cfg.Listen, nil)
|
||||
log.WithError(http.ListenAndServe(cfg.Listen, nil)).Error("HTTP Server exited unexpectedly")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue