You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a side note, it seems like cloudfoundry/gorouter#329 never really wen't into effect, the PerformTruncate option of the custom writer is never passed on to the access log writer 😄
I'd propose to adjust those writers a bit: the writer itself expects to get one access log per call to Write. When writing to file, a new line is appended and when writing to syslog we just keep the log as-is. The syslog writer can then also truncate the log at the desired length.
Current behavior
When configuring gorouter to send access logs via syslog, every log will be followed by an empty log. This is due to the access log record writing two times, once for the actual log and once for the new line (which is intended for the file writer): https://github.com/cloudfoundry/gorouter/blob/2ae1647bff83f6fdb4e45eb18ea5d0452e661e77/accesslog/schema/access_log_record.go#L358-L365
Desired behavior
When writing logs to syslog there is no need to append a new line and it should be omitted.
Affected Version
0.295.0
The text was updated successfully, but these errors were encountered: