# Path: conjureup/consts.py
# UNSPECIFIED_SPELL = '_unspecified_spell'
# JAAS_CLOUDS = {'ec2', 'azure', 'gce'}
# JAAS_DOMAIN = 'jimm.jujucharms.com'
# JAAS_ENDPOINT = JAAS_DOMAIN + ':443'
# CUSTOM_PROVIDERS = ['localhost', 'maas', 'vsphere', 'openstack']
# ALLOWED_CONSTRAINTS = [
#     'arch',
#     'container',
#     'cpu-cores',
#     'cores',
#     'cpu-power',
#     'mem',
#     'root-disk',
#     'tags',
#     'instance-type',
#     'spaces',
#     'virt-type'
# ]
#     JUJU = 'juju'
#     SNAP = 'snap'
#     AWS = 'ec2'
#     MAAS = 'maas'
#     AZURE = 'azure'
#     GOOGLE = 'gce'
#     GCE = 'gce'
#     CLOUDSIGMA = 'cloudsigma'
#     JOYENT = 'joyent'
#     OPENSTACK = 'openstack'
#     RACKSPACE = 'openstack'
#     VSPHERE = 'vsphere'
#     ORACLE = 'oracle'
#     LOCALHOST = 'localhost'
#     LOCAL = 'localhost'
#     LXD = 'localhost'
#     VALIDATE_INPUT = 'validate-input'
#     AFTER_INPUT = 'after-input'
#     BEFORE_CONFIG = 'before-config'
#     BEFORE_DEPLOY = 'before-deploy'
#     BEFORE_WAIT = 'before-wait'
#     AFTER_DEPLOY = 'after-deploy'
# class spell_types:
# class cloud_types:
# class PHASES(Enum):


import logging
import os
import stat
from logging.handlers import SysLogHandler, TimedRotatingFileHandler
from conjureup import consts



def setup_logging(app, logfile, debug=True):
    old_factory = logging.getLogRecordFactory()

    def spell_record_factory(*args, **kwargs):
        record = old_factory(*args, **kwargs)
        if record.name != 'conjure-up':

# Path: conjureup/consts.py
# UNSPECIFIED_SPELL = '_unspecified_spell'
# JAAS_CLOUDS = {'ec2', 'azure', 'gce'}
# JAAS_DOMAIN = 'jimm.jujucharms.com'
# JAAS_ENDPOINT = JAAS_DOMAIN + ':443'
# CUSTOM_PROVIDERS = ['localhost', 'maas', 'vsphere', 'openstack']
# ALLOWED_CONSTRAINTS = [
#     'arch',
#     'container',
#     'cpu-cores',
#     'cores',
#     'cpu-power',
#     'mem',
#     'root-disk',
#     'tags',
#     'instance-type',
#     'spaces',
#     'virt-type'
# ]
#     JUJU = 'juju'
#     SNAP = 'snap'
#     AWS = 'ec2'
#     MAAS = 'maas'
#     AZURE = 'azure'
#     GOOGLE = 'gce'
#     GCE = 'gce'
#     CLOUDSIGMA = 'cloudsigma'
#     JOYENT = 'joyent'
#     OPENSTACK = 'openstack'
#     RACKSPACE = 'openstack'
#     VSPHERE = 'vsphere'
#     ORACLE = 'oracle'
#     LOCALHOST = 'localhost'
#     LOCAL = 'localhost'
#     LXD = 'localhost'
#     VALIDATE_INPUT = 'validate-input'
#     AFTER_INPUT = 'after-input'
#     BEFORE_CONFIG = 'before-config'
#     BEFORE_DEPLOY = 'before-deploy'
#     BEFORE_WAIT = 'before-wait'
#     AFTER_DEPLOY = 'after-deploy'
# class spell_types:
# class cloud_types:
# class PHASES(Enum):


# Path: conjureup/log.py
import logging
import os
import stat
from logging.handlers import SysLogHandler, TimedRotatingFileHandler
from conjureup import consts




def setup_logging(app, logfile, debug=True):
    old_factory = logging.getLogRecordFactory()

    def spell_record_factory(*args, **kwargs):
        record = old_factory(*args, **kwargs)
        if record.name != 'conjure-up':

            record.filename = '{}: {}'.format(record.name, record.filename)