summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-28 13:19:38 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-28 13:19:38 (EDT)
commit213f8594c0ca2f6db69880d3e6098e5155d6a89e (patch)
tree940e08fb3495e109424d4e7d827a150ea64d879e /src
parent411048976915c498ff4477ff2ffb7eaa1029affd (diff)
downloadfirman.sh-213f8594c0ca2f6db69880d3e6098e5155d6a89e.zip
firman.sh-213f8594c0ca2f6db69880d3e6098e5155d6a89e.tar.gz
firman.sh-213f8594c0ca2f6db69880d3e6098e5155d6a89e.tar.bz2
log_*(): Don't overwrite log file with each message
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