[GRASS-SVN] r29708 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jan 14 10:45:24 EST 2008


Author: martinl
Date: 2008-01-14 10:45:24 -0500 (Mon, 14 Jan 2008)
New Revision: 29708

Modified:
   grass/trunk/gui/wxpython/gui_modules/debug.py
Log:
wxGUI: Fix debugging

Modified: grass/trunk/gui/wxpython/gui_modules/debug.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/debug.py	2008-01-14 15:28:13 UTC (rev 29707)
+++ grass/trunk/gui/wxpython/gui_modules/debug.py	2008-01-14 15:45:24 UTC (rev 29708)
@@ -12,7 +12,7 @@
 AUTHORS: The GRASS Development Team
          Martin Landa <landa.martin gmail.com>
 
-COPYRIGHT: (C) 2007 by the GRASS Development Team
+COPYRIGHT: (C) 2007-2008 by the GRASS Development Team
            This program is free software under the GNU General Public
            License (>=v2). Read the file COPYING that comes with GRASS
            for details.
@@ -28,15 +28,7 @@
     """
     GRASS Debugging
 
-    Usage:
-    import cmd
-
-         cmd.Command (cmd=["g.gisenv", "set=DEBUG=3"]) # only GUI debug messages DEBUG=GUI:3
-
-         import grassenv # or reload (grassenv)
-
-         debug = Debug()
-         debug.msg (3, "message level=%d" % 3)
+    export GRASS_WX_DEBUG=[0-5]
     """
     def __init__(self):
         # default level
@@ -59,7 +51,7 @@
     def msg (self, level, message):
         self._update_level()
         if self.debuglevel > 0 and level > 0 and level <= self.debuglevel:
-            print >> sys.stderr, "GUI D%d/%d: %s" % (level, level, message)
+            print >> sys.stderr, "GUI D%d/%d: %s" % (level, self.debuglevel, message)
 
 # Debug instance
 Debug = DebugMsg()



More information about the grass-commit mailing list