Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
add isinfoEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
gavingaozhangmin committed Sep 2, 2021
1 parent 9453349 commit ef03236
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,14 @@ public void open(Configuration parameters) throws Exception {
topic2Producer = new HashMap<>();
}
//super.open(parameters);

try {
ObjectMapper m = new ObjectMapper();
ObjectWriter w = m.writerWithDefaultPrettyPrinter();
log.info("Pulsar sink config: {}", w.writeValueAsString(properties));
} catch (IOException e) {
log.error("Failed to dump sink config info", e);
if (log.isInfoEnabled()) {
try {
ObjectMapper m = new ObjectMapper();
ObjectWriter w = m.writerWithDefaultPrettyPrinter();
log.info("Pulsar sink config: {}", w.writeValueAsString(properties));
} catch (IOException e) {
log.error("Failed to dump sink config info", e);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,14 @@ public void open(Configuration parameters) throws Exception {
}
}

try {
ObjectMapper m = new ObjectMapper();
ObjectWriter w = m.writerWithDefaultPrettyPrinter();
log.info("Pulsar source config: {}", w.writeValueAsString(properties));
} catch (IOException e) {
log.error("Failed to dump source config info", e);
if (log.isInfoEnabled()) {
try {
ObjectMapper m = new ObjectMapper();
ObjectWriter w = m.writerWithDefaultPrettyPrinter();
log.info("Pulsar source config: {}", w.writeValueAsString(properties));
} catch (IOException e) {
log.error("Failed to dump source config info", e);
}
}
}

Expand Down

0 comments on commit ef03236

Please sign in to comment.