MCPcopy Create free account
hub / github.com/Tencent/ObjectDetection-OneStageDet / setLogging

Function setLogging

utils/envs.py:16–27  ·  view source on GitHub ↗
(log_dir, stdout_flag)

Source from the content-addressed store, hash-verified

14
15
16def setLogging(log_dir, stdout_flag):
17 safeMakeDirs(log_dir)
18 dt = datetime.now()
19 log_name = dt.strftime('%Y-%m-%d_time_%H_%M_%S') + '.log'
20
21 log_fp = os.path.join(log_dir, log_name)
22 #print os.path.abspath(log_fp)
23
24 if stdout_flag:
25 logging.basicConfig(format='%(asctime)s:%(levelname)s:%(message)s', level=logging.DEBUG)
26 else:
27 logging.basicConfig(filename=log_fp, format='%(asctime)s:%(levelname)s:%(message)s', level=logging.DEBUG)
28
29
30def combineConfig(cur_cfg, train_flag):

Callers 1

initEnvFunction · 0.85

Calls 1

safeMakeDirsFunction · 0.85

Tested by

no test coverage detected