From 91fee4b8616ce94be3b18f58b8d361d784ce92a6 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Tue, 3 Mar 2009 11:56:00 -0500 Subject: fix to logging to prefix all log output with log prefix, and allow changing of log prefix. --- src/share/common | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/share/common') diff --git a/src/share/common b/src/share/common index 83120d1..ea872ba 100644 --- a/src/share/common +++ b/src/share/common @@ -76,11 +76,10 @@ log() { fi if [ "$priority" = "$level" -a "$output" = 'true' ] ; then if [ "$1" ] ; then - echo -n "ms: " >&2 - echo "$@" >&2 + echo "$@" else - cat >&2 - fi + cat + fi | sed 's/^/'"${LOG_PREFIX}"'/' >&2 fi done } -- cgit v1.2.3