Closed zdwong closed 7 years ago
I only can see the training log in terminal, but I want to save the training log into a file. How can I modify the code?
import logging # set up logger logging.basicConfig() logger = logging.getLogger() logger.setLevel(logging.INFO)
I figure it out by this: logging.basicConfig() logger = logging.getLogger() logger.setLevel(logging.INFO) if log_file: fh = logging.FileHandler(log_file) logger.addHandler(fh)
I only can see the training log in terminal, but I want to save the training log into a file. How can I modify the code?
import logging # set up logger logging.basicConfig() logger = logging.getLogger() logger.setLevel(logging.INFO)