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

Commit

Permalink
Implement access logging for run command
Browse files Browse the repository at this point in the history
Signed-off-by: Knut Ahlers <[email protected]>
  • Loading branch information
Luzifer committed Apr 13, 2017
1 parent 1f99e30 commit fe6c2d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strings"

"github.com/Luzifer/gh-private-dl/privatehub"
http_helper "github.com/Luzifer/go_helpers/http"
log "github.com/Sirupsen/logrus"
"github.com/gorilla/mux"
sparta "github.com/mweagle/Sparta"
Expand All @@ -31,7 +32,7 @@ func runLocally(cmd *cobra.Command, args []string) error {
r.HandleFunc("/status", func(res http.ResponseWriter, r *http.Request) { res.WriteHeader(http.StatusOK) })

log.Printf("Starting local webserver on %s", executionPort)
return http.ListenAndServe(executionPort, r)
return http.ListenAndServe(executionPort, http_helper.NewHTTPLogHandler(r))
}

func handleLocalExecution(res http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit fe6c2d0

Please sign in to comment.