# Copyright (c) 2000-2001 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

"""debug is deprecated"""

__revision__ = "$Id: debug.py,v 1.7 2001/07/18 08:26:57 alf Exp $"

## DEBUG
DEBUG_TABLE = {'socket_manager':0,
               'al_init':1,
               'al':0,
               'al_transition':0,
               'al_fetch':1,
               'al_check':1,
               'al_memory':0,
               'al_action':0,
               'al_xsl':0,
               'al_events':0,
               'al_condition':0,
               'al_lock':0,
               'al_plan':0
               }

def toggle_debug_table(key) :
    if DEBUG_TABLE.get(key) :
        DEBUG_TABLE[key] = 0
    else :
        DEBUG_TABLE[key] = 1
            
    
def debug_msg(key, msg) :
    if DEBUG_TABLE.get(key,0) :
        print key,':',msg 
