|
|
@ -97,15 +97,15 @@ class LogReader:
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
self.logStats = os.stat(self.logPath)
|
|
|
|
self.logStats = os.stat(self.logPath)
|
|
|
|
except OSError:
|
|
|
|
|
|
|
|
logSys.error("Unable to get stat on "+self.logPath)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.lastModTime == self.logStats.st_mtime:
|
|
|
|
if self.lastModTime == self.logStats.st_mtime:
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
logSys.debug(self.logPath+" has been modified")
|
|
|
|
logSys.debug(self.logPath+" has been modified")
|
|
|
|
self.lastModTime = self.logStats.st_mtime
|
|
|
|
self.lastModTime = self.logStats.st_mtime
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
|
|
|
|
except OSError:
|
|
|
|
|
|
|
|
logSys.error("Unable to get stat on "+self.logPath)
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
def setFilePos(self, file):
|
|
|
|
def setFilePos(self, file):
|
|
|
|
""" Sets the file position. We must take care of log file rotation
|
|
|
|
""" Sets the file position. We must take care of log file rotation
|
|
|
|