if os.environ.get('DISTRIBUTION') == 'production':
env['PB_SUITE'] = 'production-proposed-updates'
+# FIXME: move this into own logger Class
logger = logging.getLogger(sys.argv[0])
logger.setLevel(logging.DEBUG)
stream_handler = logging.StreamHandler()
from sqlalchemy import Table, Column, Integer, String, MetaData, Sequence
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.exc import NoResultFound
+import logging
+from logging import Formatter
CWD = os.environ.get('WORKSPACE')
PERSISTENCE_FILE = os.path.join(CWD, '..', '.persistence')
Session = sessionmaker(bind=engine)
Base.metadata.create_all(engine)
+# FIXME: move this into own logger Class
+logger = logging.getLogger(sys.argv[0])
+logger.setLevel(logging.DEBUG)
+stream_handler = logging.StreamHandler()
+stream_handler.setLevel(logging.DEBUG)
+formatter = Formatter('%(asctime)s %(name)s[%(process)d] %(levelname)s: %(message)s')
+stream_handler.setFormatter(formatter)
+logger.addHandler(stream_handler)
+
class KernelVersion(Base):
__tablename__ = 'branch_kernel_version'
id = Column(Integer, Sequence('branch_id'), primary_key=True)