kirklund commented on a change in pull request #7299:
URL: https://github.com/apache/geode/pull/7299#discussion_r792248994
##########
File path:
geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilterConfiguration.java
##########
@@ -93,32 +107,45 @@ public boolean configure() {
globalSerialFilter.setFilter();
// log statement that filter is now configured
- logger.accept("Global serial filter is now configured.");
+ infoLogger.accept("Global serial filter is now configured.");
return true;
} catch (UnsupportedOperationException e) {
- if (hasRootCauseWithMessage(e, IllegalStateException.class,
- "Serial filter can only be set once")) {
-
- // log statement that filter was already configured
- logger.accept("Global serial filter is already configured.");
- }
+ handleUnsupportedOperationException(e);
return false;
}
}
- private static boolean hasRootCauseWithMessage(Throwable throwable,
+ private void
handleUnsupportedOperationException(UnsupportedOperationException e) {
+ if (hasRootCauseWithMessageContaining(e, IllegalStateException.class,
+ "Serial filter can only be set once")) {
+
+ // log statement that filter was already configured
+ warnLogger.accept("Global serial filter is already configured.");
+ }
+ if (hasRootCauseWithMessageContaining(e, ClassNotFoundException.class,
+ "ObjectInputFilter")) {
+
+ // log statement that a global serial filter cannot be configured
+ errorLogger.accept(
+ "Geode was unable to configure a global serialization filter because
ObjectInputFilter not found.");
Review comment:
@dschneider-pivotal It's used to ensure a secured JVM but it doesn't
belong to the security logger. This is actually the same log statement that
Bruce originally added years ago but changed to error log level. I think I
should change all of these back to info and polish up the wording for
consistency and to make sure the user knows what to do if it occurs.
I originally changed it to error just to get the user's attention. If they
are trying to rely on security the JVM by setting
`-Dgeode.enableGlobalSerialFilter=true` then I thought they might need this
statement to be above info level just so they notice it.
Any more thoughts on this before I change it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]