Skip to content

Commit d3852a0

Browse files
committed
change: to byte
1 parent 2088054 commit d3852a0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

middleware.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ func writeRequestLog(r *http.Request, config *Config, status int, responseSize i
215215
return err
216216
}
217217

218-
requestLogJson = append(requestLogJson, '\n')
218+
// append \n
219+
requestLogJson = append(requestLogJson, 0xa)
219220

220221
_, err = config.RequestLogOut.Write(requestLogJson)
221222
return err

stackdriver.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ func (l *ContextLogger) write(severity Severity, msg string) error {
299299
_, _ = fmt.Fprintln(os.Stderr, err.Error())
300300
return err
301301
}
302-
logJson = append(logJson, '\n')
302+
303+
// append \n
304+
logJson = append(logJson, 0xa)
303305

304306
_, err = l.out.Write(logJson)
305307
return err

0 commit comments

Comments
 (0)