Suppress redis logs, separate file with redis config

This commit is contained in:
Kirill Fedoseev 2019-10-11 17:39:50 +03:00
parent 2fa0a50d61
commit 5413a3e7a1
5 changed files with 11 additions and 3 deletions

View File

@ -12,7 +12,10 @@ echo "Resetting block in redis"
docker network create redis_net > /dev/null 2>&1 || true
docker kill redis > /dev/null 2>&1 || true
docker rm redis > /dev/null 2>&1 || true
docker run --rm --network redis_net -d --name redis -v "$PWD/validator$N/$TARGET_NETWORK/db:/data" redis:5.0.5-alpine > /dev/null 2>&1 || true
docker run --rm --network redis_net -d --name redis \
-v "`pwd`/validator$N/$TARGET_NETWORK/db:/data" \
-v "`dirname "$(pwd)"`/src/oracle/configs/redis.conf:/usr/local/etc/redis/redis.conf" \
redis:5.0.5-alpine > /dev/null 2>&1 || true
../src/oracle/scripts/resetToBlock/run.sh redis_net $1

View File

@ -0,0 +1 @@
loglevel warning

View File

@ -62,6 +62,8 @@ services:
image: redis:5.0.5-alpine
volumes:
- '${PWD}/${TARGET_NETWORK}/db:/data'
- './configs/redis.conf:/usr/local/etc/redis/redis.conf'
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
networks:
- test_network
rabbitmq:

View File

@ -66,6 +66,8 @@ services:
image: redis:5.0.5-alpine
volumes:
- '${PWD}/${TARGET_NETWORK}/db:/data'
- './configs/redis.conf:/usr/local/etc/redis/redis.conf'
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
networks:
- redis-signer-net
- redis-keygen-net

View File

@ -14,8 +14,8 @@ redis.on('connect', () => {
logger.info('Connected to redis')
})
redis.on('error', () => {
logger.warn('Redis error')
redis.on('error', e => {
logger.warn('Redis error %o', e)
})
module.exports = redis