All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mindsnacks.zinc.classes.ZincLogging Maven / Gradle / Ivy

There is a newer version: 1.6.2
Show newest version
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