adding a debugging Header printout
This commit is contained in:
parent
de330d561a
commit
510b0fb62a
1 changed files with 11 additions and 0 deletions
11
httplog.go
11
httplog.go
|
@ -7,6 +7,17 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// for debugging request headers
|
||||||
|
func LogHeaders(r *http.Request) {
|
||||||
|
fmt.Printf("HEADERS:\n")
|
||||||
|
for k, v := range r.Header {
|
||||||
|
fmt.Printf("\t%s\n", k)
|
||||||
|
for i, _ := range v {
|
||||||
|
fmt.Printf("\t\t%s\n", v[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* kindof a common log type output */
|
/* kindof a common log type output */
|
||||||
func LogRequest(r *http.Request, statusCode int) {
|
func LogRequest(r *http.Request, statusCode int) {
|
||||||
var addr string
|
var addr string
|
||||||
|
|
Loading…
Reference in a new issue