Hello. Trying to test my packages on different machines, I wrote script to create and run AMIs for amd64 and i386. It works, but I have problem with logging - i.e. the second run of the loop logs everything twice: == code == from bootstrapvz.base.main import run import bootstrapvz.base.log options = {'MANIFEST': None, '--debug': False, '--dry-run': False, '--help': False, '--pause-on-error': False, '--log': '/var/log/bootstrap-vz'} if not os.path.exists(options['--log']): os.makedirs(options['--log']) amis = {} manifest = "unstable.{architecture}.json" for architecture in ('amd64', 'i386'): manifest_filename = manifest.format(architecture=architecture) options['MANIFEST'] = manifest_filename log_filename = bootstrapvz.base.log.get_log_filename(options['MANIFEST']) logfile = os.path.join(options['--log'], log_filename) bootstrapvz.base.log.setup_logger(logfile=logfile, debug=options['--debug']) info = run(options) == code == I analysed the bootstrap-vz code and it seems that there is no ability to remove logger - only to add one. Did I miss something? If there is no possibility to remove logger, I can just create one log file. This is not big problem - I do not intend to store logs from building AMIs, only to have them in case something goes wrong. Changing bootstrap-vz to allow for removing logger is not very high on my list of things to do - HVM is much more urgent. Best regards. -- Tomasz Rybak GPG/PGP key ID: 2AD5 9860 Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860 http://member.acm.org/~tomaszrybak
Attachment:
signature.asc
Description: This is a digitally signed message part