Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import logging
- for iter in xrange(1,cycles+1):
- test_dir = pri_sm_ip + "_" + str(initial_time_stamp)
- run_dir_path = "run/"+test_dir+"/cycle"+str(iter)
- try:
- os.makedirs(run_dir_path)
- except Exception as e:
- bs = "error:"+str(e)
- print bs
- log_file_name = str(run_dir_path)+'/zee.log'
- logging.basicConfig(level=logging.INFO,
- format='%(asctime)s %(levelname)-8s [%(module)-14s:%(lineno)s - %(funcName)-15s] %(message)-10s',
- datefmt='%a, %d %b %Y %H:%M:%S',
- filename=log_file_name,
- filemode='w')
- logger = logging.getLogger(__name__)
- logging.getLogger("paramiko").setLevel(logging.WARNING)#need this to avoid paramiko info things getting logged
- runTests()
Add Comment
Please, Sign In to add comment