|
@@ -1,17 +1,16 @@
|
|
|
import logging
|
|
|
+from logging.config import dictConfig
|
|
|
import time
|
|
|
import yaml
|
|
|
from importlib import import_module
|
|
|
|
|
|
-logging.basicConfig(level=logging.INFO)
|
|
|
-logger = logging.getLogger(__name__)
|
|
|
-
|
|
|
-logger.info("starting")
|
|
|
-
|
|
|
# read config
|
|
|
with open("config.yml", "r") as f:
|
|
|
config = yaml.load(f, Loader=yaml.FullLoader)
|
|
|
|
|
|
+dictConfig(config['Logging'])
|
|
|
+logger = logging.getLogger(__name__)
|
|
|
+
|
|
|
def createModules(configItems, type):
|
|
|
for item in configItems:
|
|
|
cls = next(iter(item))
|
|
@@ -49,7 +48,7 @@ outputs = list(createModules(config['Outputs'], "output"))
|
|
|
for source in inputs:
|
|
|
source.start()
|
|
|
|
|
|
-logger.info("started sources")
|
|
|
+logger.debug("started sources")
|
|
|
|
|
|
def executeMiddleware(middleware, values):
|
|
|
submodules = getattr(middleware, 'submodules', [])
|