Skip to content

Commit

Permalink
DBZ-8367 print error message via LOGGER and System.err
Browse files Browse the repository at this point in the history
  • Loading branch information
paumr authored and jpechane committed Oct 31, 2024
1 parent c43df5c commit e946ae0
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,15 @@ private Config loadConfigOrDie() {
}
catch (NoSuchElementException e) {
final String configFile = Paths.get(System.getProperty("user.dir"), "config", "application.properties").toString();
// CHECKSTYLE IGNORE check FOR NEXT 2 LINES
System.err.println(String.format("Failed to load mandatory config value '%s'. Please check you have a correct Debezium server config in %s or required "
+ "properties are defined via system or environment variables.", PROP_SINK_TYPE, configFile));
final String errorMessage = String
.format("Failed to load mandatory config value '%s'. Please check you have a correct Debezium server config in %s or required "
+ "properties are defined via system or environment variables.", PROP_SINK_TYPE, configFile);

// Print to stderr in case of logging misconfiguration.
// CHECKSTYLE IGNORE check FOR NEXT 1 LINES
System.err.println(errorMessage);
LOGGER.error(errorMessage);

Quarkus.asyncExit();
}
return config;
Expand Down

0 comments on commit e946ae0

Please sign in to comment.