    001package com.hammurapi.common.concurrent;
    002
    003import java.util.logging.Level;
    004import java.util.logging.LogRecord;
    005
    006/**
    007 * Logger for concurrent/distributed operations where logging along the execution path
    008 * is more convenient than traditional class-based logging.
    009 * This interface was created to mimic essential functionality of java.util.Logger class.
    010 * @author Pavel Vlasov
    011 *
    012 */
    013public interface Logger {
    014
    015        void fine(String msg);
    016        void finer(String msg);
    017        void finest(String msg);
    018        void info(String msg);
    019        void severe(String msg);
    020        void warning(String msg);
    021
    022        void log(Level level, String msg);
    023        void log(Level level, String msg, Object param1);
    024        void log(Level level, String msg, Object params[]);
    025        void log(Level level, String msg, Throwable thrown);
    026
    027        void log(LogRecord record);
    028
    029        /**
    030         * Returns a sub-logger of a given logger.
    031         * @param name Sub-logger name.
    032         * @return
    033         */
    034        Logger getLogger(String name);
    035
    036        boolean isLoggable(Level level);
    037
    038}