diff --git a/scripts/start-configuration b/scripts/start-configuration index 2117f61c..7929bd65 100755 --- a/scripts/start-configuration +++ b/scripts/start-configuration @@ -54,8 +54,8 @@ fi if isTrue "${DEBUG_MEMORY:-false}"; then log "Memory usage and availability (in MB)" - uname -pars - free -m + uname -pars | applyLogPrefix + free -m | applyLogPrefix fi ########################################## diff --git a/scripts/start-utils b/scripts/start-utils index fa9a0c0f..34963936 100755 --- a/scripts/start-utils +++ b/scripts/start-utils @@ -125,6 +125,12 @@ function logn() { echo -n "[init] $*" } +# Use as +# cmd | applyLogPrefix +function applyLogPrefix() { + sed 's/^/[init] /' +} + function log() { local oldState # The return status when listing options is zero if all optnames are enabled, non- zero otherwise.