Open plasticfist opened 2 years ago
You can design your docker container how restrict the log files, e.g. together with docker run …
I did it like:
docker run --name "name-of-your-container-to-be-created" …otheroptions… \
--log-opt max-size=300m \
--log-opt max-file=3 \
--log-opt compress=true \
…
I guess the official documentation is on https://docs.docker.com/config/containers/logging/local/ and those sections there …
Thank you for this! Good stop gap measure, and generally useful across all docker images, agree.
OP question however was, is there any way to control the verbosity logging of this application. It is sending a massive deluge of informational debugging text into the log. Most users would only want to only see error/critical messages in the log.
nice docker, streaming works well for the very large triple store riot conversions I'm running however it appears the default logging creates a massive -json.log file in /var/lib/docker/container/xxx logging in json format every triple processed. For now I'm force pruning after every run, but that isn't ideal, simply suppressing the (unused?) logging inside the container would be much better.
I do need to capture stdout and stderr msgs outside the container, but I hope to suppress creation of that -json.log file inside the container.
What is the best way?