[rrd4j] Improve logging of exceptions thrown by getDB (#14068)

Add exception message for better identification of root cause.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich 2022-12-27 10:55:15 +01:00 committed by Jacob Laursen
parent 7c0716edef
commit c4a8304c13

View File

@ -156,7 +156,7 @@ public class RRD4jPersistenceService implements QueryablePersistenceService {
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;
@ -258,7 +258,7 @@ public class RRD4jPersistenceService implements QueryablePersistenceService {
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) {