def _simple_print_line(cls, a_line_dict): """ print a gems line as it is """ #for the moment remove micro seconds pos = a_line_dict['time'].rfind('.') the_time = tu.gemsdate_to_simpledate( a_line_dict['time'][:pos]).center(19) lvl = a_line_dict['lvl'] #cut filenames longer than 80 chars if len(a_line_dict['msg']) > 139: message = a_line_dict['msg'][:136] + '...' else: message = a_line_dict['msg'][:139] msg = message.ljust(139) #print('%s %s %s\n' %(time, lvl, msg)) GEMSColPrinter.log.info( get_string_to_print( a_line_dict['lvl'], '%s %s %s %s' % (the_time, ' '.ljust(7), lvl, msg)))
def print_line(cls, a_line_dict): """ print a gems line """ #for the moment remove micro seconds pos = a_line_dict['time'].rfind('.') time = tu.gemsdate_to_simpledate(a_line_dict['time'][:pos]).center(19) lvl = a_line_dict['lvl'].center(3) msg = a_line_dict['msg'].center(80) print('%s %s %s\n' %(time, lvl, msg))
def print_line(cls, a_line_dict): """ print a gems line """ #for the moment remove micro seconds pos = a_line_dict['time'].rfind('.') time = tu.gemsdate_to_simpledate(a_line_dict['time'][:pos]).center(19) lvl = a_line_dict['lvl'].center(3) msg = a_line_dict['msg'].center(80) print('%s %s %s\n' % (time, lvl, msg))
def _simple_print_line(cls, a_line_dict): """ print a gems line as it is """ #for the moment remove micro seconds pos = a_line_dict['time'].rfind('.') the_time = tu.gemsdate_to_simpledate(a_line_dict['time'][:pos]).center(19) lvl = a_line_dict['lvl'] #cut filenames longer than 80 chars if len(a_line_dict['msg']) > 139: message = a_line_dict['msg'][:136] + '...' else: message = a_line_dict['msg'][:139] msg = message.ljust(139) #print('%s %s %s\n' %(time, lvl, msg)) GEMSColPrinter.log.info(get_string_to_print(a_line_dict['lvl'],'%s %s %s %s' %(the_time, ' '.ljust(7), lvl, msg)))