diff options
author | Arne H Juul <arnej@yahoo-inc.com> | 2016-07-05 19:26:26 +0200 |
---|---|---|
committer | Arne H Juul <arnej@yahoo-inc.com> | 2016-07-07 15:20:39 +0200 |
commit | cde3133c56433088864dc951e4f3384f479f40f2 (patch) | |
tree | 2dddcabe4dd804f30b44f0cffd72e8b2b8cef91d /vespabase | |
parent | 2cf46bafea51a5e22195ae445ab474da8ebe318a (diff) |
bring back jsvc mode
* bring back JSVC mode (aka yjava_daemon mode) as a possibility
* create and use a common log_message function
Diffstat (limited to 'vespabase')
-rwxr-xr-x | vespabase/src/common-env.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/vespabase/src/common-env.sh b/vespabase/src/common-env.sh index e2e20b9bd8f..b69dde089d4 100755 --- a/vespabase/src/common-env.sh +++ b/vespabase/src/common-env.sh @@ -237,12 +237,20 @@ getJavaOptionsIPV46() { fi } +log_message () { + msg_log_level="info" + case $1 in + error|warning|info|event|config|debug|spam) msg_log_level=$1; shift;; + esac + printf "%s\t%s\t%s\n" $$ $msg_log_level "$*" +} + log_debug_message () { - if [ -n "$YINST_RUNNING" ]; then - echo "debug $*" 1>&2 + if [ "$YINST_RUNNING" ]; then + log_message "debug" "$*" fi } log_warning_message () { - echo "warning $*" 1>&2 + log_message "warning" "$*" 1>&2 } |