logging verändert
This commit is contained in:
parent
4688bc4df3
commit
66455580b1
8
http.go
8
http.go
|
@ -6,9 +6,9 @@ import (
|
|||
)
|
||||
|
||||
func httpHandleFunc(urlPath string, filepath string, contentType string) {
|
||||
logger(readHttpYML() + "/" + urlPath + " - " + filepath + " <" + contentType + ">")
|
||||
logger(readHttpYML() + "/" + urlPath + " <--> " + filepath + " <" + contentType + ">")
|
||||
http.HandleFunc("/"+urlPath, func(w http.ResponseWriter, r *http.Request) {
|
||||
logger(r.Method + " <--> request -> " + readHttpYML() + "/" + urlPath + " <" + contentType + ">")
|
||||
logger(r.Method + " request -> " + readHttpYML() + "/" + urlPath + " <" + contentType + ">")
|
||||
|
||||
w.Header().Add("Content-Type", contentType)
|
||||
|
||||
|
@ -17,7 +17,7 @@ func httpHandleFunc(urlPath string, filepath string, contentType string) {
|
|||
}
|
||||
|
||||
func httpHandleFuncWithPOST(urlPath string, filepath string, contentType string) {
|
||||
logger(readHttpYML() + "/" + urlPath + " - " + filepath + " <" + contentType + ">")
|
||||
logger(readHttpYML() + "/" + urlPath + " <--> " + filepath + " <" + contentType + ">")
|
||||
s := new(submit)
|
||||
s.data = "null"
|
||||
http.HandleFunc("/"+urlPath, func(w http.ResponseWriter, r *http.Request) {
|
||||
|
@ -26,7 +26,7 @@ func httpHandleFuncWithPOST(urlPath string, filepath string, contentType string)
|
|||
errorPanic(err)
|
||||
}
|
||||
|
||||
logger(r.Method + " <--> request -> " + readHttpYML() + "/" + urlPath + " <" + contentType + ">")
|
||||
logger(r.Method + " request -> " + readHttpYML() + "/" + urlPath + " <" + contentType + ">")
|
||||
|
||||
w.Header().Add("Content-Type", contentType)
|
||||
|
||||
|
|
Loading…
Reference in New Issue