def testLogger(): logger = Logger("test logger", level = logging.DEBUG) logger.info("info message") logger.warn("warn message") logger.error("error message") logger.fatal("fatal message") logger.close()
def testLogger(): logger = Logger("test logger", level=logging.DEBUG) logger.info("info message") logger.warn("warn message") logger.warning("warning message") logger.error("error message") logger.critical("critical message") logger.fatal("fatal message") logger.debug("debug message") logger.close()
Pyro.config.PYRO_DNS_URI = True try: transfers = Transfers(conf, apMon, logger) except FDTCopyException, ex: logger.fatal(ex) # everything failed - all transfers if conf.get("report"): # TODO # if necessary - may take just the input or the copyjobfile # and generate something with everything assigned 1 logger.error("Report file was required, can't generate it with " "failure on this stage ...") if apMon: apMon.free() logger.warn("fdtcp finished.") logger.close() sys.exit(1) # main result status of the fdtcp app run, any failed transfer # from transfers.transfers causes whole app status set to 1 appExitStatus = 0 try: for transfer in transfers.transfers.values(): try: transfer.performTransfer() transfer.result = 0 except FDTCopyException, ex: logger.error("Transfer failed, reason: %s" % ex) transfer.result = 1 transfer.log = ex
Pyro.config.PYRO_DNS_URI = True try: transfers = Transfers(conf, apMon, logger) except FDTCopyException, ex: logger.fatal(ex) # everything failed - all transfers if conf.get("report"): # TODO # if necessary - may take just the input or the copyjobfile # and generate something with everything assigned 1 logger.error("Report file was required, can't generate it with " "failure on this stage ...") apMon.free() logger.warn("fdtcp finished.") logger.close() sys.exit(1) try: for transfer in transfers.transfers.values(): try: transfer.performTransfer() transfer.result = 0 except FDTCopyException, ex: logger.error("Transfer failed, reason: %s" % ex) transfer.result = 1 transfer.log = ex except ExecutorException, ex: # TODO