File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 176
176
177
177
# Log messages to dedicated log file if running in batch mode.
178
178
if args .batch :
179
+ logfile = os .path .join (logdir , args .project + ".log" )
180
+ logger .debug ("Switching logging to the {} file" .
181
+ format (logfile ))
179
182
logging .shutdown ()
180
183
181
184
# Remove the existing handler so that logger can be reconfigured.
182
185
for handler in logging .root .handlers [:]:
183
186
logging .root .removeHandler (handler )
184
187
185
- logging .basicConfig (filename = os .path .join (logdir ,
186
- args .project + ".log" ), filemode = 'a' ,
188
+ logging .basicConfig (filename = logfile , filemode = 'a' ,
187
189
format = '%(asctime)s - %(levelname)s: %(message)s' ,
188
190
datefmt = '%m/%d/%Y %I:%M:%S %p' ,
189
191
level = logging .DEBUG if args .debug
You can’t perform that action at this time.
0 commit comments