Repository navigation
Logging drivers - #10568
Logging drivers#10568
Conversation
|
|
|
"docker logs is not very actively used" << I think you're going to need to backup this statement with some stats or some facts, because I actively use (but I don't need fetch+truncate) |
|
❤️ |
|
@paultag will be excited :D On Wed, Feb 4, 2015 at 3:03 PM, Alexander Morozov [email protected]
|
|
I AM SO EXCITED 🎊 🎊 🎊 |
There was a problem hiding this comment.
yup, hard to track them in docs :(
|
I'm pretty sure that there is some race :) Also whole test |
|
Omg, it's green |
|
\o/ On Thu, Feb 5, 2015 at 2:04 PM, Alexander Morozov [email protected]
|
|
@LK4D4 yeah, I noticed it, but formatting doesn't bother me -- the information is all there, and there's absolutely no possible chance that a stray "Ctrl+C" kills my production process with |
|
Also, question: should we throw an error for |
|
+1 to an error for that since we can't fetch the logs correctly in that case
|
|
LGTM |
|
LGTM |
|
@fredlf @SvenDowideit @jamtur01 Could you look at docs please? |
|
@jamtur01 fixed, thanks. PTAL |
There was a problem hiding this comment.
hmm, maybe quotes or "logs" command?
|
Minor comment - otherwise LGTM. |
|
Just a couple of copy edits. LGTM otherwise. |
There was a problem hiding this comment.
please add how this affects (or not) the functioning of docker logs for that container, and if it changes that, add some info to the help for docker logs to tell the user how to know.
similarly for the API
I would suggest that docker logs should return a message like logging disabled so the user knows what is happening and why.
There was a problem hiding this comment.
Yeah, it is returning. I'll add info to all places.
|
@gdm85 addresses really good concerns, but I feel like they're something that can be tackled after shipping this first implementation. There is never going to be a perfect solution, specially if we want to enter the network partitions space. My vote(if it's any valuable) would be to merge this, gather more feedback with real use cases and keep iterating. |
There was a problem hiding this comment.
I don't really understand the need for this. In all cases, shouldn't we better copy the hostConfig structure and modifying the copy instead of altering the container config in place?
There was a problem hiding this comment.
Maybe, I just copied behavior of links. Want me to fix that in this PR?
There was a problem hiding this comment.
I didn't see the Links code above. Let's keep this as it is, I'll change both in a later PR.
|
@LK4D4 that's already fair enough for me :) |
|
LGTM 👍 |
|
@icecrime It have three LGTMS from docs team btw :) |
|
🤦 |
|
@ibuildthecloud Waiting for your PRs! We still have chance to merge them to 1.6 |
|
@LK4D4 @ibuildthecloud would be awesome to see syslog in 1.6 for sure. |
|
@LK4D4 my only concern with this is what if I want to write That would mean I'd have to fork Docker, and I don't think upstream Docker is interested in e.g. a Kafka driver, msgpack driver, some other logging API over HTTP etc., only major use cases like |
|
@sirupsen I thought about generic driver, which just writes serialized messages to tcp socket. Only configuration is host:port and serialization/compress protocol(that makes sense to support I think). |
|
@sirupsen I believe that will be done with docker plugins/extensions. Until then, an alternative once the syslog PR is merged, is to write an adapter that receives syslog messages and forwards them to your custom logging server transforming the message on the fly. |
|
@LK4D4 I was going to start working on the TCP driver, but couple of implementation questions: What should the command line interface be like for configuring the address and serialization? Does TCP really make more sense than UDP here? Fire-and-forget seems somewhat reasonable, given that the client's logging daemon may have crashed. For similar reasons I didn't want to implement a named pipe, because a crashed client could cause the container to hang easily. Of course we can protect against that, but it seems reasonable to use a protocol that handles that entirely. Perhaps we just need both. |
|
@tiborvass can you tell me more about this planned Docker plugin/extensions API? Curious. |
|
Thank you so much for this @LK4D4 and the Docker team overall for the great review+inclusion. Excited for 1.6 release! |
Initial try to implement logging driver interface. I skipped fetching logs part from #7195 because it makes sense only for docker logs and actually docker logs is not very actively used.
It is pretty easy to implement logging driver with this, I have
syslogandremotein mind. Remote will just send serializedlogger.Messages to tcp socket.Awaiting your comments.