From 968bec4af232fdbbb0e5c612afc1296cbb69241a Mon Sep 17 00:00:00 2001 From: Simon Hildrew Date: Tue, 19 Jan 2021 14:46:57 +0000 Subject: [PATCH] Log warning if a deprecated file is used --- .../com/gu/mediaservice/lib/config/GridConfigLoader.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common-lib/src/main/scala/com/gu/mediaservice/lib/config/GridConfigLoader.scala b/common-lib/src/main/scala/com/gu/mediaservice/lib/config/GridConfigLoader.scala index 816def4b97..dbe8eee5da 100644 --- a/common-lib/src/main/scala/com/gu/mediaservice/lib/config/GridConfigLoader.scala +++ b/common-lib/src/main/scala/com/gu/mediaservice/lib/config/GridConfigLoader.scala @@ -46,6 +46,9 @@ object GridConfigLoader extends StrictLogging { private def loadConfiguration(file: File): Configuration = { if (file.exists) { logger.info(s"Loading config from $file") + if (file.getPath.endsWith(".properties")) { + logger.warn(s"Configuring the Grid with Java properties files is deprecated as of #3011, please switch to .conf files. See #3037 for a conversion utility.") + } Configuration(ConfigFactory.parseFile(file)) } else { logger.info(s"Skipping config file $file as it doesn't exist")