Closedown

This commit is contained in:
boccioli_m
2017-10-20 10:33:13 +02:00
parent bc81020970
commit fd2df928b2
5 changed files with 10 additions and 8 deletions
+3 -3
View File
@@ -69,12 +69,12 @@ class TestingTool:
"""
Print/log information
text = the string to be printed/logged
severity = 0:Info 1:Warning 2:Error
severity = 0:Info, 1:Warning, 2:Error
"""
import time
time.ctime()
now = time.strftime('%Y.%m.%d %H:%M:%S')
sev = ['INFO','WARN','ERRO']
sev = ['INF','WAR','ERR']
logText = sev[severity] + ' - ' + self.deviceName + ' ' + self.testName + ': ' + str(text)
print now + ' ' + logText
try:
@@ -86,7 +86,7 @@ class TestingTool:
log(logText)
except:
#cannot write log
print now + ' ' + self.deviceName + ' - ' + self.testName + ': ' + 'cannot write Log in Data'
print now + ' ' + sev[2] + ' - ' + self.deviceName + ' ' + self.testName + ': ' + 'cannot write Log in Data'
def printParams(self):