dracut-logger.sh: empty functions for log funcs, which are below level

master
Harald Hoyer 2012-06-22 15:35:09 +02:00
parent 5d897c82b9
commit b47d7a5fd4
1 changed files with 33 additions and 0 deletions

View File

@ -164,6 +164,39 @@ dlog_init() {
readonly maxloglvl=$maxloglvl_l
export maxloglvl


if (($stdloglvl < 6)) && (($kmsgloglvl < 6)) && (($fileloglvl < 6)); then
unset dtrace
dtrace() { :; };
fi

if (($stdloglvl < 5)) && (($kmsgloglvl < 5)) && (($fileloglvl < 5)); then
unset ddebug
ddebug() { :; };
fi

if (($stdloglvl < 4)) && (($kmsgloglvl < 4)) && (($fileloglvl < 4)); then
unset dinfo
dinfo() { :; };
fi

if (($stdloglvl < 3)) && (($kmsgloglvl < 3)) && (($fileloglvl < 3)); then
unset dwarn
dwarn() { :; };
unset dwarning
dwarning() { :; };
fi

if (($stdloglvl < 2)) && (($kmsgloglvl < 2)) && (($fileloglvl < 2)); then
unset derror
derror() { :; };
fi

if (($stdloglvl < 1)) && (($kmsgloglvl < 1)) && (($fileloglvl < 1)); then
unset dfatal
dfatal() { :; };
fi

[ -n "$errmsg" ] && derror "$errmsg"

return $ret