[Compose] New images with LOG_LINES

[Update] Do not add empty line in each loop
This commit is contained in:
andre.peters
2018-01-08 22:00:54 +01:00
parent 1c2ec43aa0
commit 1e9cae9084
9 changed files with 29 additions and 13 deletions

View File

@@ -37,7 +37,7 @@ log_msg() {
redis-cli -h redis LPUSH WATCHDOG_LOG "{\"time\":\"$(date +%s)\",\"message\":\"$(printf '%s' "${1}" | \
tr '%&;$"_[]{}-\r\n' ' ')\"}" > /dev/null
fi
redis-cli -h redis LTRIM WATCHDOG_LOG 0 9999 > /dev/null
redis-cli -h redis LTRIM WATCHDOG_LOG 0 ${LOG_LINES} > /dev/null
echo $(date) $(printf '%s\n' "${1}")
}