sendgridlabs / loggly-docker

Docker container for loggly (via syslog)
MIT License
44 stars 39 forks source link

Add LOGGLY_DEBUG variable to enable STDOUT logging #15

Closed vladgh closed 9 years ago

vladgh commented 9 years ago

This disables stdout logging by default and adds an optional LOGGLY_DEBUG environment variable which, when true, turns on stdout logging (FIXES #14).

jonathan-short commented 9 years ago

Thanks!

ebr commented 9 years ago

Thank you @vladgh! just got to work on this and noticed it's already fixed! :+1:

vladgh commented 9 years ago

No problem. I agree that having the option to turn on/off stdout is good.

However, I would argue that disabling stdout by default is probably not a very good idea. In my opinion, having a container that does not output anything to docker logs is wrong, because you don't have any debug options. You don't have an easy way to know where the issue is: either with docker or the container or even with loggly's servers.

Your loop issue and space constraints can easily be overridden multiple ways:

ebr commented 9 years ago

@vladgh good points, and i do agree that complete lack of output may be somewhat confusing when troubleshooting. But i would also argue that this is a lesser evil than mirroring everything to stdout by default. When using logspout or any similar solution, only the --log-driver=none option is viable:

The overarching point however is that if someone using this image does also run logspout or similar, it is dangerous to leave them to discover this issue the hard way. It would be safer to turn on debugging in a controlled setting, if needed.

Since having all aggregated syslog being mirrored to stdout is really only useful for debugging, I feel the way this feature is implemented right now is perfect - so thanks again. But perhaps it's worth exploring how errors can be caught and written out to stderr, so that the container is not completely silent.