Commit ed6549a3365b468fba5865eed219826e8cf9366b

Authored by Marko Tikvić
1 parent 372beaf627
Exists in master

minor output format changes

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
... ... @@ -107,14 +107,14 @@ func (l *Logger) RequestLog(req *http.Request, userid string) string {
107 107 return msg
108 108 }
109 109  
110   -func (l *Logger) ResponseLog(status int, duration time.Duration) string {
  110 +func (l *Logger) ResponseLog(status int, duration time.Duration, size int64) string {
111 111 if l.outputFile == nil {
112 112 return ""
113 113 }
114 114  
115 115 var b strings.Builder
116   - fmt.Fprintf(&b, "Response: %d %v\n", status, duration)
117   - b.WriteString("==============================================================\n\n")
  116 + fmt.Fprintf(&b, "Response:\n%d %v %dB\n", status, duration, size)
  117 + b.WriteString("==============================================================\n")
118 118 msg := b.String()
119 119  
120 120 return msg
... ...