Changeset 352


Ignore:
Timestamp:
23-05-08 12:08:16 (5 years ago)
Author:
thomas
Message:
  • moap/util/command.py:
  • moap/util/util.py: Implement .debug to chain up correctly to Log class.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r351 r352  
     12008-05-23  Thomas Vander Stichele  <thomas at apestaart dot org> 
     2 
     3        * moap/util/command.py: 
     4        * moap/util/util.py: 
     5          Implement .debug to chain up correctly to Log class. 
     6 
    172008-05-23  Thomas Vander Stichele  <thomas at apestaart dot org> 
    28 
  • trunk/moap/util/command.py

    r216 r352  
    55Command class. 
    66""" 
     7from moap.extern.log import log 
     8from moap.extern.command import command 
    79 
    8 # FIXME: remove this compat import 
    9 from moap.extern.command.command import * 
     10class LogCommand(command.Command, log.Loggable): 
     11    def __init__(self, parentCommand=None, **kwargs): 
     12        command.Command.__init__(self, parentCommand, **kwargs) 
     13        self.logCategory = self.name 
     14 
     15    # command.Command has a fake debug method, so choose the right one 
     16    def debug(self, format, *args): 
     17        kwargs = {} 
     18        log.Loggable.doLog(self, log.DEBUG, -2, format, *args, **kwargs) 
     19 
  • trunk/moap/util/util.py

    r148 r352  
    77import tempfile 
    88 
    9 from moap.util import command, log 
     9from moap.extern.log import log 
     10from moap.extern.command import command 
    1011 
    1112def getPackageModules(packageName, ignore=None): 
     
    137138        self.logCategory = self.name 
    138139 
    139  
     140    # command.Command has a fake debug method, so choose the right one 
     141    def debug(self, format, *args): 
     142        kwargs = {} 
     143        log.Loggable.doLog(self, log.DEBUG, -2, format, *args, **kwargs) 
Note: See TracChangeset for help on using the changeset viewer.