Skip to content

Commit d234562

Browse files
committed
trimming long lines
1 parent ffb9955 commit d234562

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

ns-common/src/main/java/org/dataone/notifications/NsConfig.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,18 @@ public static synchronized void reload() {
8181
"Can't load config properties from default config file: " + DEFAULT_CONFIG_FILE
8282
+ "; Error: " + e.getMessage(), e);
8383
}
84-
84+
8585
// First add any environment variables to config, as highest precedence
8686
composite.addConfiguration(new MapConfiguration(getEnvOverrides(defaultYamlConfig)));
8787

8888
// Then add external YAML overrides, if they exist
8989
log.info("External config file path: {}", extConfigFilePath);
9090
if (externalYamlConfig != null) {
91-
log.info("External config file loaded successfully from path {}. Adding to configuration with precedence over defaults.",
91+
log.info("External config file loaded successfully from " +
92+
"path {}. Adding to configuration with precedence over defaults.",
9293
extConfigFilePath);
93-
log.info("EXTERNAL CONFIGURATION VALUES: \n{}", getAsString(externalYamlConfig));
94+
log.info("EXTERNAL CONFIGURATION VALUES: \n{}",
95+
getAsString(externalYamlConfig));
9496
composite.addConfiguration(externalYamlConfig);
9597
}else{
9698
log.info("No external config file loaded. Skipping addition to configuration.");

ns-consumer/src/main/java/org/dataone/notifications/messaging/consumer/SubscriptionEventConsumer.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,18 @@ public void start() {
4949
if (!running.compareAndSet(false, true)) {
5050
return;
5151
}
52-
log.info("Starting SubscriptionEventConsumer for queue {}", properties.queueName());
52+
log.info("Starting SubscriptionEventConsumer for queue {}",
53+
properties.queueName());
5354
executor.submit(this::consumeLoop);
5455
}
5556

5657
private void consumeLoop() {
57-
log.info("Starting RabbitMQ consumer loop for queue {}", properties.queueName());
58+
log.info("Starting RabbitMQ consumer loop for queue {}",
59+
properties.queueName());
5860
while (running.get()) {
5961
try (Channel channel = newChannel()) {
60-
log.info("Created channel to RabbitMQ, consuming from queue {}", properties.queueName());
62+
log.info("Created channel to RabbitMQ, consuming from queue {}",
63+
properties.queueName());
6164
DeliverCallback callback = (consumerTag, delivery) -> handleDelivery(channel, delivery);
6265
channel.basicConsume(properties.queueName(), false, callback, consumerTag -> {});
6366
if(channel.isOpen()){
@@ -175,7 +178,9 @@ private Connection createConnection() throws IOException, TimeoutException {
175178
factory.setAutomaticRecoveryEnabled(true);
176179
factory.setNetworkRecoveryInterval(5000);
177180
factory.setRequestedHeartbeat(30);
178-
log.info("Attempting to create RabbitMQ connection to {}:{} with virtual host '{}'", properties.host(), properties.port(), properties.virtualHost());
181+
log.info("Attempting to create RabbitMQ connection to " +
182+
" {}:{} with virtual host '{}'",
183+
properties.host(), properties.port(), properties.virtualHost());
179184
return factory.newConnection();
180185
}catch(IOException e){
181186
log.info("IOException in createConnection: {}", e.getMessage());
@@ -215,7 +220,9 @@ public synchronized void shutdown() {
215220
* Quick check whether an active connection exists.
216221
*/
217222
public synchronized boolean isConnected() {
218-
log.info("Checking connection status: connection={}, connection.isOpen={}", connection, connection != null ? connection.isOpen() : "n/a");
223+
log.info("Checking connection status: " +
224+
" connection={}, connection.isOpen={}",
225+
connection, connection != null ? connection.isOpen() : "n/a");
219226
return connection != null && connection.isOpen();
220227
}
221228

0 commit comments

Comments
 (0)