view src/main/java/net/borgac/clusterrpc/client/Logger.java @ 6:0e608c466a58

Implement ClientChannel/SocketWrapper and add logging and tests
author Lewin Bormann <lbo@spheniscida.de>
date Sat, 24 Sep 2016 16:42:13 +0200
parents
children
line wrap: on
line source

package net.borgac.clusterrpc.client;

/**
 * A simple logger interface.
 *
 * @author lbo
 */
public interface Logger {

    public void log(Loglevel l, Object... o);

    /**
     * Set the loglevel. Any log messages with a loglevel smaller than this will
     * be swallowed.
     *
     * @param l
     */
    public void setLoglevel(Loglevel l);

    /**
     * Loglevel designates how critical a log message is.
     */
    public static enum Loglevel implements Comparable<Loglevel> {
        DEBUG,
        INFO,
        WARNING,
        ERROR,
        FATAL // FATAL is supposed to abort the program. It is used for non-recoverable errors.
    }
}