scripts/functions is responsible for initiating the log file.

Users of the log facility are in charge to use, move, delete this log file, now.
This commit is contained in:
Yann E. MORIN" 2007-06-16 22:23:53 +00:00
parent d8bc11b165
commit 5e07f7cfc3
3 changed files with 9 additions and 8 deletions

View File

@ -27,13 +27,6 @@ fi
CT_STAR_DATE=`CT_DoDate +%s%N`
CT_STAR_DATE_HUMAN=`CT_DoDate +%Y%m%d.%H%M%S`
# Log policy:
# - first of all, save stdout so we can see the live logs: fd #6
exec 6>&1
# - then point stdout to the log file (temporary for now)
tmp_log_file="${CT_TOP_DIR}/log.$$"
exec >>"${tmp_log_file}"
# Are we configured? We'll need that later...
CT_TestOrAbort "Configuration file not found. Please create one." -f "${CT_TOP_DIR}/.config"

View File

@ -35,6 +35,13 @@ set -o pipefail
# shared is not found
set +o hashall
# Log policy:
# - first of all, save stdout so we can see the live logs: fd #6
exec 6>&1
# - then point stdout to the log file (temporary for now)
tmp_log_file="${CT_TOP_DIR}/log.$$"
exec >>"${tmp_log_file}"
# The different log levels:
CT_LOG_LEVEL_ERROR=0
CT_LOG_LEVEL_WARN=1

View File

@ -10,8 +10,9 @@
. "${CT_TOP_DIR}/scripts/functions"
exec 6>&1
# Don't care about any log file
exec >/dev/null
rm -f "${tmp_log_file}"
# Parse the configuration file
CT_TestOrAbort "Configuration file not found. Please create one." -f "${CT_TOP_DIR}/.config"