diff options
author | Jameson Graef Rollins <jrollins@finestructure.net> | 2009-03-03 11:56:00 -0500 |
---|---|---|
committer | Jameson Graef Rollins <jrollins@finestructure.net> | 2009-03-03 11:56:00 -0500 |
commit | 91fee4b8616ce94be3b18f58b8d361d784ce92a6 (patch) | |
tree | 3c6a2ff49085e51d56f1d6b24f1997bc3523968b /src/share/common | |
parent | b94c148b51a53f47ac2513af0e400cc9234bc3dd (diff) |
fix to logging to prefix all log output with log prefix, and allow changing of log prefix.
Diffstat (limited to 'src/share/common')
-rw-r--r-- | src/share/common | 7 |
1 files changed, 3 insertions, 4 deletions
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 } |