Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2181#discussion_r202058086
--- Diff:
artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java
---
@@ -227,7 +227,11 @@ private void createTableIfNotExists(String tableName,
String... sqls) throws SQL
}
}
} catch (SQLException e) {
- logger.warn(JDBCUtils.appendSQLExceptionDetails(new
StringBuilder("Can't verify the initialization of table
").append(tableName).append(" due to:"), e,
sqlProvider.getCountJournalRecordsSQL()));
+ if (logger.isDebugEnabled()) {
+ logger.debug(JDBCUtils.appendSQLExceptionDetails(new
StringBuilder("Can't verify the initialization of table
").append(tableName).append(" due to:"), e,
sqlProvider.getCountJournalRecordsSQL()));
+ } else {
+ logger.infof("Can't verify the initialization of table
%s", tableName);
--- End diff --
for trace.. it's the same as debug.. although you usually put on if
(log.isTraceEnabled()) in front of it... as it's usually a lot more verbose.
The Logger for debug and trace should be:
```java
Logger logger =
Logger.getLogger(somethingThatGetsTheClassAndIdon'trememberNow)
if (logger.istTraceEnabled()) {
logger.trace(....);
}
```
---