コード例 #1
0
ファイル: analyze_utils.py プロジェクト: JoaoGRRodrigues/rodd
def print_db_logfile(database): #pylint: disable-msg=R0201
    """
      print database in log file for debuging purposes
    """
    LOG.info('--BEG-------------------------------------------------------------------------')
    for rec in database:
        #LOG.info('%s' %(rec))
        LOG.info('fn=%s, jn=%s, cr=%s, up=%s,an=%s,bl=%s,fn=%s,ch=%s,lupdate=%s' % ( rec['filename'], rec['jobname'], \
                                                                        time_utils.datetime_to_time(rec['created']), \
                                                                        time_utils.datetime_to_time(rec['uplinked']), \
                                                                        time_utils.datetime_to_time(rec['announced']), \
                                                                        time_utils.datetime_to_time(rec['blocked']), \
                                                                        time_utils.datetime_to_time(rec['finished']), \
                                                                        rec['channel'],\
                                                                        time_utils.datetime_to_time(rec['last_update'])) )
    LOG.info('--END-------------------------------------------------------------------------')    
コード例 #2
0
ファイル: analyze_utils.py プロジェクト: JoaoGRRodrigues/rodd
def print_rec_in_logfile(rec):
    """
       Print rec in file
    """
    LOG.info('*********** Delete fn=%s, jn=%s, cr=%s, up=%s, an=%s, bl=%s, fn=%s, ch=%s, lupdate=%s' % ( rec['filename'], rec['jobname'], \
                                                                                        time_utils.datetime_to_time(rec['created']), \
                                                                                        time_utils.datetime_to_time(rec['uplinked']), \
                                                                                        time_utils.datetime_to_time(rec['announced']), \
                                                                                        time_utils.datetime_to_time(rec['blocked']), \
                                                                                        time_utils.datetime_to_time(rec['finished']), \
                                                                                        rec['channel'],\
                                                                                        time_utils.datetime_to_time(rec['last_update'])) )