docker-bench-security/output_lib.sh
lusitania c8dded38aa Make colours, escape sequences optional
Coloured output is tedious to parse, even unnecessary where the report
backend is not a terminal.

Signed-off-by: Peter <lusitania@users.noreply.github.com>
2016-01-02 19:59:02 +01:00

21 lines
352 B
Bash

#!/bin/sh
logit () {
printf "%b\n" "$1" | tee -a "$logger"
}
info () {
printf "%b\n" "${bldblu}[INFO]${txtrst} $1" | tee -a "$logger"
}
pass () {
printf "%b\n" "${bldgrn}[PASS]${txtrst} $1" | tee -a "$logger"
}
warn () {
printf "%b\n" "${bldred}[WARN]${txtrst} $1" | tee -a "$logger"
}
yell () {
printf "%b\n" "${bldylw}$1${txtrst}\n"
}