sameersbn / docker-redis

Dockerfile to create a Docker container image for Redis.
MIT License
156 stars 139 forks source link

[IMPROVEMENT] Customize loglevel via environment variable #5

Closed marb-dev closed 8 years ago

marb-dev commented 9 years ago

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).

rasekar2000 commented 8 years ago

+1

sameersbn commented 8 years ago

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.

marb-dev commented 8 years ago

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