Allow logger configuration ingestion from environment
Related-PROD: PRODX-11433
Change-Id: Ib7b9940d097cf5a6d1c774fa5b6c51feb684d660
diff --git a/sf_notifier/settings/production.py b/sf_notifier/settings/production.py
index dfc9639..e0450c8 100644
--- a/sf_notifier/settings/production.py
+++ b/sf_notifier/settings/production.py
@@ -23,14 +23,10 @@
}
},
'loggers': {
- 'sf_notifier.server': {
- 'level': 'INFO',
+ logger: {
+ 'level': os.getenv('LOGGER_LEVEL', 'INFO').upper(),
'handlers': ['file', 'wsgi']
- },
- 'sf_notifier.salesforce.client': {
- 'level': 'INFO',
- 'handlers': ['file', 'wsgi']
- }
+ } for logger in ['sf_notifier.server', 'sf_notifier.salesforce.client']
}
}