Ignore:
Timestamp:
03/07/11 12:49:44 (8 years ago)
Author:
aspidites
Message:

Patch by Aspidites:

  • converted print statements to logging messages.
  • all of parpg's log messages go to the same file, but are differenciated by their class names
  • need to find a way to manipulate fife's log level
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/game/parpg/common/listeners/event_listener.py

    r736 r797  
    2020 
    2121from fife import fife 
     22import logging 
     23 
     24logger = logging.getLogger('event_listener') 
    2225 
    2326class EventListener(fife.IKeyListener,  
     
    5154                self.listeners[listener_type].append(listener)             
    5255        else: 
    53             print "Listener type \" " + listener_type + "\" not supported" 
     56            logger.warning("Listener type " 
     57                                  "'{0}' not supported".format(listener_type)) 
    5458     
    5559    def removeListener(self, listener_type, listener): 
     
    5862            self.listeners[listener_type].remove(listener) 
    5963        else: 
    60             print "Listener type \" " + listener_type + "\" not supported" 
     64            logger.warning("Listener type " 
     65                                  "'{0}' not supported".format(listener_type)) 
    6166             
    6267    def mousePressed(self, evt): 
Note: See TracChangeset for help on using the changeset viewer.