How bad would it be to use something like this in a Dockerfile:
ENTRYPOINT node . | tee >(send_logs_to_elastic_search)
most of the logging solutions require some pretty nasty configuration. The above would be a way for us to capture the logs programmatically and write our own glue code.
The main problem with the above solution is that CMD
arguments would not append to the node
process? I assume they would get append to the tee
process instead? something like this:
docker run foo --arg1 --arg2
I assume that would then look like:
node . | tee >(send_logs_to_elastic_search) --arg1 --arg2
anybody know?
The other potentially problem is that your container is less configurable it's "hardcoded" to send the logs to the send_logs_to_elastic_search
process.