def create_log_record(self, tablename):
        '''
        Method to initialize a logger; appends the file the log
        saves to with relavent information regarding what table
        and type of information is being recorded
        '''
        try:
            globalid = self._inputs['metacheck'].lnedentry['globalid']
            filename = os.path.split(self._inputs['fileoptions'].filename)[1]
            dt = (str(tm.datetime.now()).split()[0]).replace("-", "_")
        except Exception as e:
            print(str(e))
            raise AttributeError('Global ID and data file not set')

        self._tablelog[tablename] = (log.configure_logger(
            'tableformat',
            os.path.join(
                rootpath, 'logs',
                '{}_{}_{}_{}.log'.format(globalid, tablename, filename, dt))))
        def create_log_record(self, tablename):
            '''
            Method to initialize a logger; appends the file the log
            saves to with relavent information regarding what table
            and type of information is being recorded
            '''
            try:
                globalid = self._inputs['metacheck'].lnedentry['globalid']
                filename = os.path.split(
                    self._inputs[
                        'fileoptions'].filename)[1]
                dt = (str(
                    tm.datetime.now()).split()[0]).replace("-", "_")
            except Exception as e:
                print(str(e))
                raise AttributeError(
                    'Global ID and data file not set')

            self._tablelog[tablename] =(
                log.configure_logger('tableformat',(
                    'logs/{}_{}_{}_{}.log'.format(
                        globalid, tablename,filename,dt))))
예제 #3
0
def mylog():
    mylog = log.configure_logger(
        'tableformat',
        rootpath + end +' logs/test_df_diff.log'
    )
    return mylog