Merge pull request #10 from speed47/dev/beautifyprint

set a fixed-size prefix for logger
This commit is contained in:
Thibault Dewailly 2017-05-19 17:20:47 +02:00 committed by GitHub
commit 4fcdf32dec

View File

@ -46,6 +46,7 @@ _logger() {
COLOR=$1
shift
test -z "$SCRIPT_NAME" && SCRIPT_NAME=$(basename $0)
SCRIPT_NAME=$(printf "%-25.25s" "$SCRIPT_NAME")
builtin echo "$*" | /usr/bin/logger -t "[CIS_Hardening] $SCRIPT_NAME" -p "user.info"
cecho $COLOR "$SCRIPT_NAME $*"
}