Shorten logging output to time
I am not sure we ever need the millisecond output. The date is typically also clear from the output (we could print the date at the beginning, once, instead, but this is not done here. Finally, in Jenkins, we typically get time stamps. Thus, it's not necessary to print this by default. On the other hand, since it might be useful when running locally, make time stamps in logs configurable.
This commit is contained in:
@@ -44,6 +44,7 @@ import constants as CONST
|
||||
def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
|
||||
|
||||
force_local = False
|
||||
date_fmt = None
|
||||
while len(argvs) > 1:
|
||||
myArgv = argvs.pop(1) # 0th is this file's name
|
||||
|
||||
@@ -56,6 +57,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
|
||||
|
||||
|
||||
#consider inline parameters
|
||||
elif re.match(r'^\-\-datefmt=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-datefmt=(.+)$', myArgv, re.IGNORECASE)
|
||||
date_fmt = matchReg.group(1)
|
||||
elif re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match(r'^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
|
||||
mode = matchReg.group(1)
|
||||
@@ -168,4 +172,4 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
sys.exit('Invalid Parameter: ' + myArgv)
|
||||
|
||||
return mode, force_local
|
||||
return mode, force_local, date_fmt
|
||||
|
||||
Reference in New Issue
Block a user