package p.studio.utilities.logs;

import org.slf4j.Logger;

import java.util.function.Consumer;

public interface LogAggregator {
    static LogAggregator empty() {
        return with(s -> {});
    }

    static LogAggregator stdout() {
        return with(System.out::println);
    }

    static LogAggregator with(final Consumer<String> consumer) {
        return new LogAggregatorImpl(consumer);
    }

    LogAggregator using(Logger logger);
    void trace(String msg);
    void debug(String msg);
    void info(String msg);
    void warn(String msg);
    void error(String msg);
    void error(String msg, Throwable t);
}
