demery-pivotal commented on a change in pull request #7299:
URL: https://github.com/apache/geode/pull/7299#discussion_r792054961
##########
File path:
geode-serialization/src/main/java/org/apache/geode/internal/serialization/filter/GlobalSerialFilterConfiguration.java
##########
@@ -38,7 +38,9 @@
private final SerializableObjectConfig serializableObjectConfig;
private final FilterPatternFactory filterPatternFactory;
private final Supplier<Set<String>> sanctionedClassesSupplier;
- private final Consumer<String> logger;
+ private final Consumer<String> infoLogger;
+ private final Consumer<String> warnLogger;
+ private final Consumer<String> errorLogger;
Review comment:
I think so, for several reasons:
- This API locks the implementation into accepting only strings. At some
point, the implementation may want to use a richer logging API. (On the other
hand: YAGNI.)
- The name `accept()` feels oddly passive, as if code is politely requesting
that the logger please consider doing a thing. A logging API would make it
clear that the code is telling the logger to log something.
- A logging API allows a test to observe all of the same interactions.
--
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]