nginx-proxy-manager/scripts/log
2020-05-09 17:21:33 -07:00

23 lines
No EOL
651 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CYAN='\E[1;36m'
YELLOW='\E[1;33m'
BLUE='\E[1;34m'
GREEN='\E[1;32m'
RED='\E[1;31m'
RESET='\E[0m'
# prints a log message
log () {
if [ "$2" == "info" ] ; then
printf "${BLUE} ${CYAN}%b${RESET}\n" "$1";
elif [ "$2" == "success" ] ; then
printf "${BLUE} ${GREEN}%b${RESET}\n" "$1";
elif [ "$2" == "danger" ] ; then
printf "${RED} %b${RESET}\n" "$1";
elif [ "$2" == "warning" ] ; then
printf "${BLUE} ${YELLOW}%b${RESET}\n" "$1";
elif [ "$2" == "hint" ] ; then
printf "${YELLOW}Hint: ${RESET}%b\n" "$1";
else #default color
printf "${BLUE} ${RESET}%b\n" "$1";
fi
}