umputun / docker-logger

Logs collector for docker
MIT License
246 stars 37 forks source link

INCLUDE option for list of included containers #9

Closed vblz closed 5 years ago

vblz commented 5 years ago

What do you think about option reverse to EXCLUDE, INCLUDE for example. INCLUDE options will get a list of containers' names, which logs will be collected. This option will be useful if you host several docker-compose projects at the same hosts. In this case, you should exclude all other containers in every project for now. I don't want to maintain a fork, but can make this feature, open PR and finish a review, so I can start after maintainer accept that option.

umputun commented 5 years ago

Just to clarify the use case - is it about multiple composes running at the same time and causing conflicts somehow? I don't see how this possible as docker won't allow the same name containers. Or by "you should exclude all other containers in every project for now" you had smth else in mind? I'm trying to understand why you even want to do it.

The original reason for exclusion is the need to suppress some noisy containers you don't want to collect logs from. In practice, this is something rear and even exotic.

Technically, this is a relatively easy change, but I failed to see the need yet.

umputun commented 5 years ago

as discussed – this is a different use case with logger as a part of project's compose. The proposed change makes sense in such a context.

umputun commented 5 years ago

pls try to use the master image (i.e. umputun/docker-logger:master) and let me know if all good

vblz commented 5 years ago

works well, tested include and include+exclude options