def test__syslogging(self, mock_genlog):
        """Test creation of syslog handler"""
        name = "adaptation engine"
        level = "a fake level"

        utils.syslog_logging(name, level)

        self.mock_logger.handlers.SysLogHandler.assert_called_once_with(
            address='/dev/log'
        )
        mock_genlog.assert_called_once_with(
            'syslog',
            mock.ANY,
            mock.ANY,
            level
        )
import time

import adaptationengine_framework.adaptationaction as adaptationaction
import adaptationengine_framework.database as database
import adaptationengine_framework.distributor as distributor
import adaptationengine_framework.enactor as enactor
import adaptationengine_framework.event as event
import adaptationengine_framework.heatresourcehandler as heatresourcehandler
import adaptationengine_framework.mqhandler as mqhandler
import adaptationengine_framework.output as output
import adaptationengine_framework.pluginmanager as pluginmanager
import adaptationengine_framework.rest as rest
import adaptationengine_framework.utils as utils


LOGGER = utils.syslog_logging('adaptation-engine', logging.DEBUG)
HEALTHLOGGER = utils.health_logging()


class AdaptationEngine:
    """
    Sit on a message queue waiting for events, pass those events to plugins,
    compile the results, and apply those results to Openstack
    """

    def __init__(self):
        """
        Create plugin and message queue managers
        """
        _manager = multiprocessing.Manager()
        self._locked_stacks = _manager.list()