forked from TrueCloudLab/distribution
Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
This commit is contained in:
parent
7ef3a5bc73
commit
2a7cf96c8f
2 changed files with 12 additions and 9 deletions
|
@ -3,8 +3,6 @@ package registry
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/docker/docker/utils"
|
||||
"github.com/gorilla/mux"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
@ -14,6 +12,10 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"github.com/docker/docker/pkg/log"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -96,7 +98,7 @@ func init() {
|
|||
|
||||
func handlerAccessLog(handler http.Handler) http.Handler {
|
||||
logHandler := func(w http.ResponseWriter, r *http.Request) {
|
||||
utils.Debugf("%s \"%s %s\"", r.RemoteAddr, r.Method, r.URL)
|
||||
log.Debugf("%s \"%s %s\"", r.RemoteAddr, r.Method, r.URL)
|
||||
handler.ServeHTTP(w, r)
|
||||
}
|
||||
return http.HandlerFunc(logHandler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue