Ejemplo n.º 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
Ejemplo n.º 2
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
Ejemplo n.º 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)
Ejemplo n.º 4
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)
Ejemplo n.º 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
Ejemplo n.º 6
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
Ejemplo n.º 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
Ejemplo n.º 8
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
Ejemplo n.º 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