[misc] test/scripts: use logger-sharelatex for logging as in production

This commit is contained in:
Jakob Ackermann
2020-11-10 10:15:03 +00:00
parent d827b521c6
commit ccf4bb1e0e
4 changed files with 1123 additions and 4 deletions
@@ -2,15 +2,16 @@
// starting and stopping redis with this script running is a good test
const redis = require('../../')
const logger = require('logger-sharelatex')
const rclient = redis.createClient({ host: 'localhost', port: '6379' })
setInterval(() => {
rclient.healthCheck((err) => {
if (err) {
console.log('HEALTH CHECK FAILED', err)
logger.error({ err }, 'HEALTH CHECK FAILED')
} else {
console.log('HEALTH CHECK OK')
logger.log('HEALTH CHECK OK')
}
})
}, 1000)