diff options
Diffstat (limited to 'lib/logging.bash')
-rw-r--r-- | lib/logging.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/logging.bash b/lib/logging.bash index 33ead42..ad0bedd 100644 --- a/lib/logging.bash +++ b/lib/logging.bash @@ -7,18 +7,18 @@ log() { local OPTIND local color - local format="[%s] %s\n" while getopts ":c:" opt do case "$opt" in c) color=$OPTARG ;; + *) alert "Unused argument specified: $opt" ;; esac done shift $(( OPTIND - 1 )) - printf "$color[%s] %s\e[0m\n" "$(date +%FT%T)" "$*" >&2 + printf "${color}[%s] %s\e[0m\n" "$(date +%FT%T)" "$*" >&2 } debug() { |