Пример #1
0
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()
Пример #2
0
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()
Пример #3
0
    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
Пример #4
0
    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