mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-09-19 15:42:58 +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
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 New Issue
Block a user