remove debug output
This commit is contained in:
parent
4cf1076197
commit
e9dff7b966
1 changed files with 4 additions and 2 deletions
6
logging
6
logging
|
@ -8,7 +8,6 @@ touch $SCRIPT_LOG
|
||||||
|
|
||||||
#for level in emerg alert crit err warning notice info debug; do
|
#for level in emerg alert crit err warning notice info debug; do
|
||||||
|
|
||||||
loglevels=(debug info notice warning err crit alert emerg)
|
|
||||||
|
|
||||||
for level in SCRIPTENTRY SCRIPTEXIT ENTRY EXIT; do
|
for level in SCRIPTENTRY SCRIPTEXIT ENTRY EXIT; do
|
||||||
printf -v functext -- '%s() {
|
printf -v functext -- '%s() {
|
||||||
|
@ -28,7 +27,9 @@ for level in SCRIPTENTRY SCRIPTEXIT ENTRY EXIT; do
|
||||||
export -f "${level}"
|
export -f "${level}"
|
||||||
done
|
done
|
||||||
|
|
||||||
for level in trace debug info notice warning err crit alert emerg; do
|
loglevels=(trace debug info notice warning err crit alert emerg)
|
||||||
|
|
||||||
|
for level in ${loglevels[@]}; do
|
||||||
loglevels=( ${loglevels[@]/$level} )
|
loglevels=( ${loglevels[@]/$level} )
|
||||||
printf -v functext -- 'log%s() {
|
printf -v functext -- 'log%s() {
|
||||||
local msg="$@"
|
local msg="$@"
|
||||||
|
@ -48,3 +49,4 @@ for level in trace debug info notice warning err crit alert emerg; do
|
||||||
eval "$functext"
|
eval "$functext"
|
||||||
export -f "log${level}"
|
export -f "log${level}"
|
||||||
done
|
done
|
||||||
|
unset loglevels
|
||||||
|
|
Loading…
Reference in a new issue