avocado/libexec/avocado-bash-utils
#!/bin/sh
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; specifically version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See LICENSE for more details.
#
# Copyright: Red Hat Inc. 2014
# Write to avocado_log
# First argument is the log level
avocado_log() {
LEVEL=`printf '%-5s' $1`
shift
echo "`date '+%H:%M:%S'` $LEVEL| $*"
}