Skip to content

Commit

Permalink
[rrd4j] Improve logging of exceptions thrown by getDB (openhab#14068)
Browse files Browse the repository at this point in the history
Add exception message for better identification of root cause.

Signed-off-by: Holger Friedrich <[email protected]>
  • Loading branch information
holgerfriedrich authored Dec 27, 2022
1 parent e5f30b1 commit e7938ae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public synchronized void store(final Item item, @Nullable final String alias) {
try {
db = getDB(name);
} catch (Exception e) {
logger.warn("Failed to open rrd4j database '{}' ({})", name, e.getClass().getName());
logger.warn("Failed to open rrd4j database '{}' to store data ({})", name, e.toString());
}
if (db == null) {
return;
Expand Down Expand Up @@ -258,7 +258,7 @@ public Iterable<HistoricItem> query(FilterCriteria filter) {
try {
db = getDB(itemName);
} catch (Exception e) {
logger.warn("Failed to open rrd4j database '{}' ({})", itemName, e.getClass().getName());
logger.warn("Failed to open rrd4j database '{}' for querying ({})", itemName, e.toString());
return List.of();
}
if (db == null) {
Expand Down

0 comments on commit e7938ae

Please sign in to comment.