Skip to content

Commit 803c321

Browse files
authored
Messaging cleanup
* Messaging cleanup - Moved a couple internal log messages to FINE instead of INFO - Cleaned up messaging when can't connect to server
1 parent c8d503d commit 803c321

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
All notable changes to this project will be documented in this file.
33
The format is based on [Keep a Changelog](http://keepachangelog.com/).
44

5+
## Unreleased
6+
7+
### Changed
8+
- Moved a couple internal log messages to FINE instead of INFO
9+
- Cleaned up messaging when can't connect to server
10+
511
## [5.4.11] 2023-06-06
612

713
### Fixed

driver/src/main/java/oracle/nosql/driver/http/Client.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,9 +855,8 @@ public Result execute(Request kvRequest) {
855855
}
856856
throw e;
857857
} catch (IOException ioe) {
858-
/* Maybe make this logFine */
859858
String name = ioe.getClass().getName();
860-
logInfo(logger, "Client execution IOException, name: " +
859+
logFine(logger, "Client execution IOException, name: " +
861860
name + ", message: " + ioe.getMessage());
862861
/*
863862
* An exception in the channel, e.g. the server may have

driver/src/main/java/oracle/nosql/driver/httpclient/HttpClient.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,7 @@ public Channel getChannel(int timeoutMs)
382382
/* retry loop with at most (retryInterval) ms timeouts */
383383
long thisTimeoutMs = (timeoutMs - msDiff);
384384
if (thisTimeoutMs <= 0) {
385-
String msg = "Timed out after " + msDiff +
386-
"ms (" + retries + " retries) trying " +
387-
"to acquire channel";
385+
String msg = "Timed out trying to acquire channel";
388386
logInfo(logger, "HttpClient " + name + " " + msg);
389387
throw new TimeoutException(msg);
390388
}
@@ -397,7 +395,7 @@ public Channel getChannel(int timeoutMs)
397395
retChan = fut.get(thisTimeoutMs, TimeUnit.MILLISECONDS);
398396
} catch (TimeoutException e) {
399397
if (retries == 0) {
400-
logInfo(logger, "Timed out after " +
398+
logFine(logger, "Timed out after " +
401399
(System.currentTimeMillis() - startMs) +
402400
"ms trying to acquire channel: retrying");
403401
}

driver/src/main/java/oracle/nosql/driver/package-info.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
* both the SDK and the underlying Netty networking at level FINE. It will
108108
* log to both the console and a local file called "driver.log."
109109
* <pre>
110-
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
110+
handlers=java.util.logging.FileHandler,java.util.logging.ConsoleHandler
111111
112112
# File config
113113
java.util.logging.FileHandler.level=ALL
@@ -143,19 +143,19 @@
143143
*
144144
* Collection of stats are controlled by the following system
145145
* properties:<ol><li>
146-
* -Dcom.oracle.nosql.sdk.nosqldriver.stats.profile=[none|regular|more|all]
147-
* Specifies the stats profile: <i>none</i> - disabled,
148-
* <i>regular</i> - per request: counters, errors, latencies, delays, retries
149-
* <i>more</i> - stats above with 95th and 99th percentile latencies
150-
* <i>all</i> - stats above with per query information.</li><li>
146+
* {@code -Dcom.oracle.nosql.sdk.nosqldriver.stats.profile=[none|regular|more|all]}<br>
147+
* Specifies the stats profile:<br> <i>none</i> - disabled<br>
148+
* <i>regular</i> - per request: counters, errors, latencies, delays, retries<br>
149+
* <i>more</i> - stats above with 95th and 99th percentile latencies<br>
150+
* <i>all</i> - stats above with per query information</li><li>
151151
*
152-
* -Dcom.oracle.nosql.sdk.nosqldriver.stats.interval=600 Interval in
153-
* seconds to log the stats, by default is 10 minutes.</li><li>
152+
* {@code -Dcom.oracle.nosql.sdk.nosqldriver.stats.interval=600}<br> Interval in
153+
* seconds to log the stats, default value is 600 seconds (10 minutes)</li><li>
154154
*
155-
* -Dcom.oracle.nosql.sdk.nosqldriver.stats.pretty-print=true Option
155+
* {@code -Dcom.oracle.nosql.sdk.nosqldriver.stats.pretty-print=true}<br> Option
156156
* to enable pretty printing of the JSON data, default value is false</li><li>
157157
*
158-
* -Dcom.oracle.nosql.sdk.nosqldriver.stats.enable-log=false Option
158+
* {@code -Dcom.oracle.nosql.sdk.nosqldriver.stats.enable-log=false}<br> Option
159159
* to turn on logging automatically if stats are enabled, default value is
160160
* true</li>
161161
* </ol><p>

0 commit comments

Comments
 (0)