(self)
Setup directory and file for logs
Setup directory and file for logs
Setup directory and file for logs
def _setup_logfile(self):
        """Setup directory and file for logs"""
        log_dir = os.path.join(self.cfg_dir, "logs")
        if not os.path.exists(log_dir):
            os.makedirs(log_dir)

        name = time.strftime("%Y%m%d-%H%M%S") + ".log"
        self.logfile = os.path.join(log_dir, name)
        logger.info("Saving logs at {}".format(self.logfile))
def _setup_logfile ( self ) : log_dir = os . path . join ( self . cfg_dir , "logs" ) if not os . path . exists ( log_dir ) : os . makedirs ( log_dir ) name = time . strftime ( "%Y%m%d-%H%M%S" ) + ".log" self . logfile = os . path . join ( log_dir , name ) logger . info ( "Saving logs at {}" . format ( self . logfile ) )