com.mindsnacks.zinc.classes.ZincLogging Maven / Gradle / Ivy
package com.mindsnacks.zinc.classes;
import java.util.ArrayList;
import java.util.List;
/**
* User: NachoSoto
* Date: 9/12/13
*/
public class ZincLogging {
private static List mListeners = new ArrayList();
public static void log(final String tag, final String message) {
for (final MessageListener listener : mListeners) {
listener.logMessage(tag, message);
}
}
public static void addListener(final MessageListener listener) {
mListeners.add(listener);
}
public static void removeListener(final MessageListener listener) {
mListeners.remove(listener);
}
public static interface MessageListener {
void logMessage(String tag, String message);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy