1
###########################################################################
3
# This file provides utility functions and is included by other scripts.
5
# The following global variables must be set before calling functions from this
7
# - basename -- base name of the calling script (main application);
8
# - log_file -- where to store log records;
10
###########################################################################
14
[ -z "$log_file" ] && return;
20
echo "[$ts] [$basename] [$log_level] $log_msg" >> "$log_file";
23
###########################################################################
30
###########################################################################
38
###########################################################################
46
###########################################################################
52
log_debug "-- $basename: finished (exit_status: $exit_status) --"