Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Medium - Android/Java Interfaces like a Boss! - Markers (Facade)
public class LoggerDispatcher implements Logger {
private final List<Logger> loggerList = new ArrayList<>();
public LoggerDispatcher(Logger... loggers) {
Collections.addAll(loggerList, loggers);
public void logMessage(String message) {
for (Logger logger : loggerList) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment