Commit 6df2d8d7 authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

bug fixed

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4711
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent d5b007a0
......@@ -37,6 +37,7 @@
# 10/05/2012 V0.3 provide output to stdout
# 18/05/2012 V0.4 provide information regarding possible message
# criticalities (thof)
# 19/05/2012 V0.5 Bug fixed - str.find didn't work as expected.
#
# =============================================================================
"""
......@@ -54,7 +55,7 @@ import csbacklog
from email.mime.text import MIMEText
from collections import deque
__version__ = "V0.4"
__version__ = "V0.5"
__subversion__ = "$Id$"
__license__ = "GPLv2"
__author__ = "Daniel Armbruster"
......@@ -231,14 +232,14 @@ def main(argv=None):
try:
for path in logFilePathes:
for line in open(path, 'r').readlines():
if line.find('INFO'):
infoDeque.appendleft("logfile:"+path+"\n"+line)
elif line.find('WARNING'):
warningDeque.appendleft("logfile:"+path+"\n"+line)
elif line.find('ERROR'):
errorList.append("logfile:"+path+"\n"+line)
elif line.find('CRITICAL'):
if 'CRITICAL' in line:
criticalList.append("logfile:"+path+"\n"+line)
elif 'ERROR' in line:
errorList.append("logfile:"+path+"\n"+line)
elif 'WARNING' in line:
warningDeque.appendleft("logfile:"+path+"\n"+line)
elif 'INFO' in line:
infoDeque.appendleft("logfile:"+path+"\n"+line)
else:
logger.getLogger().info("Illegal line in logfile found.")
except IOError as err:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment