summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/log.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/log.sh b/src/log.sh
index 03fbe5e..73632cf 100644
--- a/src/log.sh
+++ b/src/log.sh
@@ -23,6 +23,7 @@ log_init()
shift 1
log_file="${file}"
+ >"${log_file}"
return 0
}
@@ -33,7 +34,7 @@ log_dbg()
shift 1
if [ "x${log_file}" != 'x' ]; then
- printf "Debug: ${fmt}\n" "${@}" >"${log_file}"
+ printf "Debug: ${fmt}\n" "${@}" >>"${log_file}"
fi
return 0
@@ -45,7 +46,7 @@ log_info()
shift 1
if [ "x${log_file}" != 'x' ]; then
- printf "${fmt}\n" "${@}" >"${log_file}"
+ printf "${fmt}\n" "${@}" >>"${log_file}"
fi
return 0
@@ -57,7 +58,7 @@ log_warn()
shift 1
if [ "x${log_file}" != 'x' ]; then
- printf "Warning: ${fmt}\n" "${@}" >"${log_file}"
+ printf "Warning: ${fmt}\n" "${@}" >>"${log_file}"
fi
return 0
@@ -69,7 +70,7 @@ log_err()
shift 1
if [ "x${log_file}" != 'x' ]; then
- printf "Error: ${fmt}\n" "${@}" >"${log_file}"
+ printf "Error: ${fmt}\n" "${@}" >>"${log_file}"
fi
return 0