projects
/
monkeysphere.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix up gen/import-key:
[monkeysphere.git]
/
src
/
share
/
common
diff --git
a/src/share/common
b/src/share/common
index 9adae05e894a5a8aedeca0d5bdd41f122b897a44..00a10080008571b4cd89b40f10fcc59015f26dfd 100644
(file)
--- a/
src/share/common
+++ b/
src/share/common
@@
-34,7
+34,8
@@
failure() {
# write output to stderr based on specified LOG_LEVEL the first
# parameter is the priority of the output, and everything else is what
# write output to stderr based on specified LOG_LEVEL the first
# parameter is the priority of the output, and everything else is what
-# is echoed to stderr
+# is echoed to stderr. If there is nothing else, then output comes
+# from stdin, and is not prefaced by log prefix.
log() {
local priority
local level
log() {
local priority
local level
@@
-79,8
+80,12
@@
log() {
output=true
fi
if [ "$priority" = "$level" -a "$output" = 'true' ] ; then
output=true
fi
if [ "$priority" = "$level" -a "$output" = 'true' ] ; then
- echo -n "ms: " >&2
- echo "$@" >&2
+ if [ "$1" ] ; then
+ echo -n "ms: " >&2
+ echo "$@" >&2
+ else
+ cat >&2
+ fi
fi
done
}
fi
done
}