[Lunar-commits]
CVS: theedge/var/lib/lunar/functions messages.lunar, 1.21, 1.22
Auke Kok
sofar at lunar-linux.org
Fri Apr 1 10:17:29 UTC 2005
Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory espresso.foo-projects.org:/home/sofar/active/theedge/var/lib/lunar/functions
Modified Files:
messages.lunar
Log Message:
Extended debugging support: use -dd -ddd -dddd or even -ddddd to increase debug level
Index: messages.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/messages.lunar,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- messages.lunar 16 Mar 2005 08:02:48 -0000 1.21
+++ messages.lunar 1 Apr 2005 10:17:23 -0000 1.22
@@ -52,12 +52,28 @@
debug_msg() {
if [ -n "$LUNAR_DEBUG" ] ; then
- echo "++ $@" > /dev/stderr
- if [ "$LUNAR_DEBUG" -ge "2" ] ; then
+ if [ "$LUNAR_DEBUG" -ge "4" ] ; then
+ PLUSSES="+++++++++++++++++++++++++*"
+ echo "${PLUSSES:0:${#FUNCNAME[@]}} $(basename $0)[$$]: $(basename ${BASH_SOURCE[1]}):${BASH_LINENO[1]}: ${FUNCNAME[1]} ($@)" > /dev/stderr
+ unset PLUSSES
+ elif [ "$LUNAR_DEBUG" -ge "3" ] ; then
+ PLUSSES="+++++++++++++++++++++++++*"
+ echo "${PLUSSES:0:${#FUNCNAME[@]}} $(basename ${BASH_SOURCE[1]}):${BASH_LINENO[1]}: ${FUNCNAME[1]} ($@)" > /dev/stderr
+ unset PLUSSES
+ elif [ "$LUNAR_DEBUG" -ge "2" ] ; then
+ PLUSSES="+++++++++++++++++++++++++*"
+ echo "${PLUSSES:0:${#FUNCNAME[@]}} ${FUNCNAME[1]} ($@)" > /dev/stderr
+ unset PLUSSES
+ else
+ echo "++ $@" > /dev/stderr
+ fi
+ if [ "$LUNAR_DEBUG" -ge "5" ] ; then
echo "++ $@" >> $TMPDIR/lp_debuglog.$$
if [ -f $TMPDIR/l_debug_var.$$ ] ; then
mv $TMPDIR/l_debug_var.$$ $TMPDIR/l_debug_var.$$.old
- fi
+ else
+ return
+ fi
set | grep '^[A-Z]' | sed 's/^/VAR /' > $TMPDIR/l_debug_var.$$
diff -U0 $TMPDIR/l_debug_var.$$.old $TMPDIR/l_debug_var.$$ | \
grep -v "^@@" | grep "VAR" | tee -a $TMPDIR/lp_debuglog.$$ > /dev/stderr
More information about the Lunar-commits
mailing list