log/simplify
This commit is contained in:
parent
449958091b
commit
54ab72488f
1 changed files with 3 additions and 13 deletions
|
@ -71,24 +71,14 @@ rwx_log_warn() {
|
||||||
|
|
||||||
# TODO simplify
|
# TODO simplify
|
||||||
|
|
||||||
_rwx_main_log() {
|
|
||||||
[ ${#} -gt 0 ] || set -- ""
|
|
||||||
local line
|
|
||||||
for line in "${@}"; do
|
|
||||||
echo "${line}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
_rwx_log() {
|
_rwx_log() {
|
||||||
local prefix="${1}"
|
local prefix="${1}"
|
||||||
shift
|
shift
|
||||||
[ ${#} -gt 0 ] || set -- ""
|
[ ${#} -gt 0 ] || set -- ""
|
||||||
local line
|
local line
|
||||||
for line in "${@}"; do
|
for line in "${@}"; do
|
||||||
if [ -n "${prefix}" ]; then
|
[ -n "${prefix}" ] &&
|
||||||
_rwx_main_log "${prefix} ${line}"
|
printf "%s" "${prefix} "
|
||||||
else
|
echo "${line}"
|
||||||
_rwx_main_log "${line}"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue