gliderlabs / gliderlabs/logspout
Logspout + AWS ECS: first 8 bytes of log message are always removed
- Dominant language
- Go
- Stars
- 4.7k
- Forks
- 661
- PR merge metrics
- No merged PRs in 30d
Description
With https://github.com/gliderlabs/logspout/commit/e0d92638b3f8e8eea4c5683498b9364b7e8e9050 you untroduced a "feature" which removes the first 8 Bytes from the log message.
router/pump.go
`
if hasHeaders {
buf.Discard(8)
}
`
Unfortunately hasHeaders will always be true when DockerContainer are running on Amazon ECS (No TTY available when running container on ECS). Due to that logspout will always remove the first 8 bytes from my logstring, which breaks my jsonoutput. I imagine I'm not the only one who uses the combination container-engine + json message + elk stack.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in router/pump.go and inspect how hasHeaders is determined before buf.Discard(8) runs. Reproduce the ECS-style no-TTY Docker logging case with JSON output, then verify that valid log messages retain their leading bytes without breaking header handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, go
- Domain
- cloud, devops, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100