-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Logspout logs for containers running with TTY enabled #231
Comments
I read the documentation a few times and found the culprit. The -t option was set in the docker-compose file. In docker compose tty: true equates to the -t option being set. This was why it was not working. Though a next curiosity, what aspects of the -t option cause logspout to not be able to route logs? Any pointers to code sections or docs explaining it? |
We ignore logs from containers with tty: https://github.com/gliderlabs/logspout/blame/a415f5d090c9a5ffd004cbbee61da9466e3077be/router/pump.go#L148 @progrium Looking at the blame/history, nothing strikes me as to why we ignore those logs. Any particular reasons? |
Would be great to be able to disable this feature and rely only on LOGSPOUT_IGNORE. Simplifies things in a PaaS type system where developers might not be aware of the impact of certain settings. |
I stumbled upon this after forking and patching logspout to use RawTerminal in the docker client LogsOptions. This gets around the tty thing. Would you be interested in a PR to make it configurable? |
@martinbaillie ever end up making a pull request? Alternatively do you have a docker-hub version of your branch? |
@untoldone No, I didn't and have nothing on Dockerhub. However I am using it at my current company in production. A vanilla Dockerfile might look something like this:
|
@martinbaillie Thanks! Super helpful |
My understanding is that most folks don't want to log interactive containers because the assumption is that those would most likely be for debugging or something of that nature. Relying on I'm sort of 👎 on removing the TTY constraint. However, making that user configurable seems reasonable. Anybody want to work on that? |
I think @davidnortonjr has a patch for this in a fork somewhere. |
@michaelshobbs There are more reasons to use interactive than just for one-off containers. It is also very useful in making production systems more debugable. I use it in production to be able to do things like |
@untoldone Understood. Support for |
@michaelshobbs Thanks! |
This doesn't seem to be working form me on master. Is this the right command?
|
Just setup a logspout to test it out. Love the ease of use of the tool!
Though I am running into issues with a certain docker-compose v1 template.
I noticed in my graylog setup that logspout is not sending any logging details for this service.
When I remove my custom log_driver and log_opt the problem is still not fixed.
The only way for me to get logspout extracting details from the container of serviceA is when I run it outside of docker-compose.
So I am curious as to why some containers in a docker-compose does not get picked up by logspout? Is this a known issue?
The text was updated successfully, but these errors were encountered: