diff --git a/inventory_provider/__init__.py b/inventory_provider/__init__.py index 485cf81ce4288c4d353520c2245104d0fe839e2d..830fc8d5a6a5693024ff5e7b6617df7d9a6e35dd 100644 --- a/inventory_provider/__init__.py +++ b/inventory_provider/__init__.py @@ -38,6 +38,9 @@ def create_app(): if "SETTINGS_FILENAME" not in os.environ: assert False, \ "environment variable SETTINGS_FILENAME' must be defined" + + logging.info("initializing Flask with config from: %r" + % app.config["SETTINGS_FILENAME"]) app.config.from_envvar("SETTINGS_FILENAME") assert "INVENTORY_PROVIDER_CONFIG_FILENAME" in app.config, ( @@ -51,8 +54,10 @@ def create_app(): from inventory_provider import config with open(app.config["INVENTORY_PROVIDER_CONFIG_FILENAME"]) as f: # test the config file can be loaded + logging.info("loading config from: %r" + % app.config["INVENTORY_PROVIDER_CONFIG_FILENAME"]) app.config["INVENTORY_PROVIDER_CONFIG"] = config.load(f) - logging.debug(app.config) + logging.info('Inventory Provider Flask app initialized') return app diff --git a/inventory_provider/tasks/worker.py b/inventory_provider/tasks/worker.py index cdfc648fff7e5d261919f4fdda0a99b4420eb4ae..e9eb4ab8dce11e830660614c995e498d2a5a9753 100644 --- a/inventory_provider/tasks/worker.py +++ b/inventory_provider/tasks/worker.py @@ -67,6 +67,9 @@ class InventoryTask(Task): class WorkerArgs(bootsteps.Step): def __init__(self, worker, config_filename, **options): with open(config_filename) as f: + task_logger = logging.getLogger(constants.TASK_LOGGER_NAME) + task_logger.info( + "Initializing worker with config from: %r % config_filename)" InventoryTask.config = config.load(f)