1
0
Fork 0
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:
Knut Ahlers 2020-01-11 20:48:01 +01:00
parent b0ff38946d
commit f42de6e8a9
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -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")
}