Closedown
This commit is contained in:
+3
-3
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user