示例#1
0
 def __init__(self, lid, level, msg, efile, eline):
     '''Constructor for the extended MemLog object.
        This object additional contains information about
        the filename as well as about the file number.'''
     MemLog.__init__(self, lid, level, msg)
     self.efile = efile
     self.eline = eline
示例#2
0
文件: MemLogFile.py 项目: apre/rmtoo
 def __init__(self, lid, level, msg, efile, eline):
     '''Constructor for the extended MemLog object.
        This object additional contains information about
        the filename as well as about the file number.'''
     MemLog.__init__(self, lid, level, msg)
     self.efile = efile
     self.eline = eline
示例#3
0
 def write_log(self, file_descriptor):
     '''Writes the message to the given file descriptor.'''
     MemLog.write_log_prefix(self, file_descriptor)
     if self.efile != None:
         file_descriptor.write("%s:" % self.efile)
     if self.eline != None:
         file_descriptor.write("%s:" % self.eline)
     MemLog.write_log_suffix(self, file_descriptor)
示例#4
0
文件: MemLogFile.py 项目: apre/rmtoo
 def write_log(self, file_descriptor):
     '''Writes the message to the given file descriptor.'''
     MemLog.write_log_prefix(self, file_descriptor)
     if self.efile != None:
         file_descriptor.write("%s:" % self.efile)
     if self.eline != None:
         file_descriptor.write("%s:" % self.eline)
     MemLog.write_log_suffix(self, file_descriptor)
示例#5
0
 def to_list(self):
     '''Returns a list of the MemLogFile.'''
     result = MemLog.to_list(self)
     if self.efile != None:
         result.append(self.efile)
         if self.eline != None:
             result.append(self.eline)
     else:
         if self.eline != None:
             result.append(None)
             result.append(self.eline)
     return result
示例#6
0
文件: MemLogFile.py 项目: apre/rmtoo
 def to_list(self):
     '''Returns a list of the MemLogFile.'''
     result = MemLog.to_list(self)
     if self.efile != None:
         result.append(self.efile)
         if self.eline != None:
             result.append(self.eline)
     else:
         if self.eline != None:
             result.append(None)
             result.append(self.eline)
     return result
示例#7
0
 def __eq__(self, other):
     '''The equal method: if everything is the same, it's true.'''
     return MemLog.__eq__(self, other) \
         and self.efile == other.efile \
         and self.eline == other.eline
示例#8
0
文件: MemLogFile.py 项目: apre/rmtoo
 def __eq__(self, other):
     '''The equal method: if everything is the same, it's true.'''
     return MemLog.__eq__(self, other) \
         and self.efile == other.efile \
         and self.eline == other.eline
示例#9
0
 def __eq__(self, other):
     '''The equal method: if everything is the same, it's true.'''
     print("MemLogFile.__eq__ [%s]" % self.lid)
     return MemLog.__eq__(self, other) \
         and self.efile == other.efile \
         and self.eline == other.eline