sameersbn/docker-redis

[IMPROVEMENT] Customize loglevel via environment variable

marb-dev opened this issue · 3 comments

I'd like to modify the log level of redis.config. The logs of my docker-compose environment is flooded by plenty occurrences of the background saving:

redis_1      | [1] 06 Sep 13:37:30.029 * 10 changes in 300 seconds. Saving...
redis_1      | [1] 06 Sep 13:37:30.029 * Background saving started by pid 449
redis_1      | [449] 06 Sep 13:37:30.047 * DB saved on disk
redis_1      | [449] 06 Sep 13:37:30.048 * RDB: 0 MB of memory used by copy-on-write
redis_1      | [1] 06 Sep 13:37:30.129 * Background saving terminated with success

Using loglevel warning instead of loglevel notice would reduce the logs to "only very important / critical messages are logged" (as stated in redis.config).

you can configure this using command line arguments, eg.

docker run -it --rm sameersbn/redis:latest --loglevel warning

Please close the report if this resolves the issue. Thanks.

edit: Please ensure you are using a rather newer version of the image. Just do a docker pull sameerbn/redis:latest.

Thank you for the hint. Passing custom argument to redis seem to work since 6c22e77.