Skip to content

Commit

Permalink
chore: update logging with connector specificity
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrudevalia committed Sep 3, 2024
1 parent 3ea4520 commit 4618fe6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Neo4jSinkConnector: SinkConnector() {
val migratedConfig = ConfigurationMigrator(settings).migrateToV51()
val mapper = ObjectMapper()
val jsonConfig = mapper.writeValueAsString(migratedConfig)
log.info("Migrated Sink configuration to v5.1 connector format: {}", jsonConfig)
log.info("Migrated Neo4j Sink Connector '{}' configuration to v5.1 connector format: {}", settings["name"], jsonConfig)
}

override fun version(): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,16 @@ class Neo4jSourceService(private val config: Neo4jSourceConnectorConfig, offsetS
log.info("Error while closing Driver instance:", it)
}

val migratedConfig = ConfigurationMigrator(config.originals() as Map<String, String>).migrateToV51().toMutableMap()
val originalConfig = config.originals() as Map<String, String>
val migratedConfig = ConfigurationMigrator(originalConfig).migrateToV51().toMutableMap()

log.debug("Defaulting v5.1 migrated configuration offset to last checked timestamp: {}", lastCheck)
migratedConfig["neo4j.start-from"] = "USER_PROVIDED"
migratedConfig["neo4j.start-from.value"] = lastCheck

val mapper = ObjectMapper()
val jsonConfig = mapper.writeValueAsString(migratedConfig)
log.info("Migrated Source configuration to v5.1 connector format: {}", jsonConfig)
log.info("Migrated Neo4j Source Connector '{}' configuration to v5.1 connector format: {}", originalConfig["name"], jsonConfig)

log.info("Neo4j Source Service closed successfully")
}
Expand Down

0 comments on commit 4618fe6

Please sign in to comment.