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:
+6
-8
@@ -62,13 +62,6 @@ import lxml.etree as ET
|
||||
import logging
|
||||
import signal
|
||||
import traceback
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
stream=sys.stdout,
|
||||
format="[%(asctime)s] %(levelname)8s: %(message)s"
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
@@ -349,7 +342,12 @@ CLUSTER = cls_cluster.Cluster()
|
||||
import args_parse
|
||||
# Force local execution, move all execution targets to localhost
|
||||
force_local = False
|
||||
mode, force_local = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER)
|
||||
mode, force_local, date_fmt = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER)
|
||||
fmt = "%(levelname)8s: %(message)s"
|
||||
if date_fmt:
|
||||
fmt = "[%(asctime)s] %(levelname)s %(message)s"
|
||||
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout, format=fmt, datefmt=date_fmt,)
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# mode amd XML class (action) analysis
|
||||
|
||||
Reference in New Issue
Block a user