Exemple #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
Exemple #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
Exemple #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)
Exemple #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)
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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