// Path: agent-logging/src/main/java/fr/irit/smac/libs/tooling/logging/AgentLog.java
// public enum ESide {
//     LEFT, RIGHT
// }
// 
// Path: agent-logging/src/main/java/fr/irit/smac/libs/tooling/logging/logback/LoggerNameDiscriminator.java
// public class LoggerNameDiscriminator implements Discriminator<ILoggingEvent> {
// 
//     private boolean started = false;
// 
//     @Override
//     public boolean isStarted() {
//         return this.started;
//     }
// 
//     @Override
//     public void start() {
//         this.started = true;
//     }
// 
//     @Override
//     public void stop() {
//         this.started = false;
//     }
// 
//     @Override
//     public String getDiscriminatingValue(ILoggingEvent logEvent) {
//         return logEvent.getLoggerName().substring(AgentLog.ROOT_AGENT_LOGGER.length()+1);
//     }
// 
//     @Override
//     public String getKey() {
//         return "loggerName";
//     }
// 
// }


import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
import ch.qos.logback.classic.sift.SiftingAppender;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.Context;
import ch.qos.logback.core.FileAppender;
import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.sift.AppenderFactory;
import fr.irit.smac.libs.tooling.logging.AgentLog.ILogItemDisplayData.ESide;
import fr.irit.smac.libs.tooling.logging.logback.LoggerNameDiscriminator;
/*
 * #%L
 * agent-logging
 * %%
 * Copyright (C) 2014 - 2015 IRIT - SMAC Team
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/lgpl-3.0.html>.
 * #L%
 */
package fr.irit.smac.libs.tooling.logging;




/**
 * Class designed to satisfy simple agent logging needs. Actually, it uses the
 * logback library.
 * 
 * @author lemouzy, perles
 * 
 */
public class AgentLog {
    
    public final static String ROOT_AGENT_LOGGER = "rootAgentLogger";

    private AgentLog() {

    }

    /**
     * Interface that helps to configure the way elements of logs are displayed
     * (format, order, justification, size, etc.)
     * 
     * @author lemouzy, perles
     */
    public static interface ILogItemDisplayData {
// Path: agent-logging/src/main/java/fr/irit/smac/libs/tooling/logging/AgentLog.java
// public enum ESide {
//     LEFT, RIGHT
// }
// 
// Path: agent-logging/src/main/java/fr/irit/smac/libs/tooling/logging/logback/LoggerNameDiscriminator.java
// public class LoggerNameDiscriminator implements Discriminator<ILoggingEvent> {
// 
//     private boolean started = false;
// 
//     @Override
//     public boolean isStarted() {
//         return this.started;
//     }
// 
//     @Override
//     public void start() {
//         this.started = true;
//     }
// 
//     @Override
//     public void stop() {
//         this.started = false;
//     }
// 
//     @Override
//     public String getDiscriminatingValue(ILoggingEvent logEvent) {
//         return logEvent.getLoggerName().substring(AgentLog.ROOT_AGENT_LOGGER.length()+1);
//     }
// 
//     @Override
//     public String getKey() {
//         return "loggerName";
//     }
// 
// }


// Path: agent-logging/src/main/java/fr/irit/smac/libs/tooling/logging/AgentLog.java
import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
import ch.qos.logback.classic.sift.SiftingAppender;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.Context;
import ch.qos.logback.core.FileAppender;
import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.sift.AppenderFactory;
import fr.irit.smac.libs.tooling.logging.AgentLog.ILogItemDisplayData.ESide;
import fr.irit.smac.libs.tooling.logging.logback.LoggerNameDiscriminator;

/*
 * #%L
 * agent-logging
 * %%
 * Copyright (C) 2014 - 2015 IRIT - SMAC Team
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * <http://www.gnu.org/licenses/lgpl-3.0.html>.
 * #L%
 */
package fr.irit.smac.libs.tooling.logging;




/**
 * Class designed to satisfy simple agent logging needs. Actually, it uses the
 * logback library.
 * 
 * @author lemouzy, perles
 * 
 */
public class AgentLog {
    
    public final static String ROOT_AGENT_LOGGER = "rootAgentLogger";

    private AgentLog() {

    }

    /**
     * Interface that helps to configure the way elements of logs are displayed
     * (format, order, justification, size, etc.)
     * 
     * @author lemouzy, perles
     */
    public static interface ILogItemDisplayData {
        public enum ESide {