@@ -33,16 +33,10 @@ open class FormattedPathFactory : RecordPathFactory() {
3333 override fun init (properties : Map <String , String >) {
3434 super .init (properties)
3535
36- format = properties[" format" ]
37- ? : run {
38- logger.warn(" Path format not provided, using '{}' instead" , DEFAULT_FORMAT )
39- DEFAULT_FORMAT
40- }
41- val pluginClassNames = properties[" plugins" ]
42- ? : run {
43- logger.warn(" Path format plugins not provided, using '{}' instead" , DEFAULT_FORMAT_PLUGINS )
44- DEFAULT_FORMAT_PLUGINS
45- }
36+ format = properties[" format" ] ? : DEFAULT_FORMAT
37+ val pluginClassNames = properties[" plugins" ] ? : DEFAULT_FORMAT_PLUGINS
38+
39+ logger.info(" Path formatter uses format '{}' with plugins '{}'" , format, pluginClassNames)
4640
4741 plugins = instantiatePlugins(pluginClassNames, properties)
4842 formatter = PathFormatter (format, plugins)
@@ -60,9 +54,17 @@ open class FormattedPathFactory : RecordPathFactory() {
6054 override fun addTopicConfiguration (topicConfig : Map <String , TopicConfig >) {
6155 topicFormatters = topicConfig
6256 .filter { (_, config) -> config.pathProperties.isNotEmpty() }
63- .mapValues { (_ , config) ->
57+ .mapValues { (topic , config) ->
6458 val topicFormat = config.pathProperties.getOrDefault(" format" , format)
6559 val pluginClassNames = config.pathProperties[" plugins" ]
60+
61+ logger.info(
62+ " Path formatter of topic {} uses format {} with plugins {}" ,
63+ topic,
64+ topicFormat,
65+ pluginClassNames
66+ )
67+
6668 val topicPlugins = if (pluginClassNames != null ) {
6769 instantiatePlugins(pluginClassNames, properties + config.pathProperties)
6870 } else plugins
0 commit comments