diff options
author | P. 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) |
commit | 213f8594c0ca2f6db69880d3e6098e5155d6a89e (patch) | |
tree | 940e08fb3495e109424d4e7d827a150ea64d879e /src | |
parent | 411048976915c498ff4477ff2ffb7eaa1029affd (diff) | |
download | firman.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.sh | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |