// Path: src/main/java/com/github/lisicnu/log4android/appender/Appender.java
// public interface Appender {
// 
// 	/**
// 	 * Size returned if log size cannot be determined.
// 	 */
// 	int SIZE_UNDEFINED = -1;
// 
// 	/**
// 	 * Do the logging.
// 	 * 
// 	 * @param clientID
// 	 *            the id of the client.
// 	 * @param name
// 	 *            the name of the logger.
// 	 * @param time
// 	 *            the time since the first logging has done (in milliseconds).
// 	 * @param level
// 	 *            the logging level
// 	 * @param message
// 	 *            the message to log.
// 	 * @param t
// 	 *            the exception to log.
// 	 */
// 	void doLog(String clientID, String name, long time, Level level, Object message, Throwable t);
// 
// 	/**
// 	 * Clear the log.
// 	 */
// 	void clear();
// 
// 	/**
// 	 * Close the log. The consequence is that the logging is disabled until the
// 	 * log is opened. The logging could be enabled by calling
// 	 * <code>open()</code>.
// 	 * 
// 	 * @throws java.io.IOException
// 	 *             if the close failed.
// 	 */
// 	void close() throws IOException;
// 
// 	/**
// 	 * Open the log. The consequence is that the logging is enabled.
// 	 *
// 	 * @throws java.io.IOException
// 	 *             if the open failed.
// 	 * 
// 	 */
// 	void open() throws IOException;
// 
// 	/**
// 	 * Check if the log is open.
// 	 * 
// 	 * @return true if the log is open, false otherwise.
// 	 */
// 	boolean isLogOpen();
// 
// 	/**
// 	 * Get the size of the log. This may not be applicable to all types of
// 	 * appenders.
// 	 * 
// 	 * @return the size of the log.
// 	 */
// 	long getLogSize();
// 
// 	/**
// 	 * Set the formatter to use.
// 	 * 
// 	 * @param formatter
// 	 *            The formatter to set.
// 	 */
// 	void setFormatter(Formatter formatter);
// 
// 	/**
// 	 * Get the formatter that is in use.
// 	 * 
// 	 * @return Returns the formatter.
// 	 */
// 	Formatter getFormatter();
// 
// }
// 
// Path: src/main/java/com/github/lisicnu/log4android/factory/DefaultAppenderFactory.java
// public enum DefaultAppenderFactory {
// 	;
// 	
// 	public static Appender createDefaultAppender() {
// 		Appender appender = new LogCatAppender();
// 		appender.setFormatter(new PatternFormatter());
// 		
// 		return appender;
// 	}
// }
// 
// Path: src/main/java/com/github/lisicnu/log4android/repository/CommonLoggerRepository.java
// public interface CommonLoggerRepository {
// 	/**
// 	 * Get the effective level for the specified logger. Note that the level of
// 	 * the current logger is not checked, since this level could be get from the
// 	 * logger itself.
// 	 * 
// 	 * @return the effective <code>Level</code>
// 	 */
// 	public Level getEffectiveLevel(String loggerName);
// }


import android.util.Log;
import com.github.lisicnu.log4android.appender.Appender;
import com.github.lisicnu.log4android.factory.DefaultAppenderFactory;
import com.github.lisicnu.log4android.repository.CommonLoggerRepository;
import java.io.IOException;
import java.util.List;
import java.util.ListIterator;
import java.util.Vector;
/*
 * Copyright 2008 The Microlog project @sourceforge.net
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.lisicnu.log4android;




/**
 * The <code>Logger</code> class is used for logging.
 * <p/>
 * This is similar to the Log4j <code>Logger</code> class. The method names are
 * the same, but we do not claim that they are 100% compatible.
 * <p/>
 * You have the ability to use named loggers as in Log4j. If you want to save
 * memory, you could use unnamed loggers.
 *
 * @author Johan Karlsson (johan.karlsson@jayway.se)
 * @author Darius Katz
 * @author Karsten Ohme
 * @since 0.1
 */
public final class Logger {
    public static final Level DEFAULT_LOG_LEVEL = Level.DEBUG;
    public static final String DEFAULT_CLIENT_ID = "Microlog";
    private String clientID = DEFAULT_CLIENT_ID;
    private static final String TAG = Logger.class.getSimpleName();
    private static final StopWatch stopWatch = new StopWatch();
    private final static List<Appender> appenderList = new Vector<Appender>(4);
    private static boolean firstLogEvent = true;
// Path: src/main/java/com/github/lisicnu/log4android/appender/Appender.java
// public interface Appender {
// 
// 	/**
// 	 * Size returned if log size cannot be determined.
// 	 */
// 	int SIZE_UNDEFINED = -1;
// 
// 	/**
// 	 * Do the logging.
// 	 * 
// 	 * @param clientID
// 	 *            the id of the client.
// 	 * @param name
// 	 *            the name of the logger.
// 	 * @param time
// 	 *            the time since the first logging has done (in milliseconds).
// 	 * @param level
// 	 *            the logging level
// 	 * @param message
// 	 *            the message to log.
// 	 * @param t
// 	 *            the exception to log.
// 	 */
// 	void doLog(String clientID, String name, long time, Level level, Object message, Throwable t);
// 
// 	/**
// 	 * Clear the log.
// 	 */
// 	void clear();
// 
// 	/**
// 	 * Close the log. The consequence is that the logging is disabled until the
// 	 * log is opened. The logging could be enabled by calling
// 	 * <code>open()</code>.
// 	 * 
// 	 * @throws java.io.IOException
// 	 *             if the close failed.
// 	 */
// 	void close() throws IOException;
// 
// 	/**
// 	 * Open the log. The consequence is that the logging is enabled.
// 	 *
// 	 * @throws java.io.IOException
// 	 *             if the open failed.
// 	 * 
// 	 */
// 	void open() throws IOException;
// 
// 	/**
// 	 * Check if the log is open.
// 	 * 
// 	 * @return true if the log is open, false otherwise.
// 	 */
// 	boolean isLogOpen();
// 
// 	/**
// 	 * Get the size of the log. This may not be applicable to all types of
// 	 * appenders.
// 	 * 
// 	 * @return the size of the log.
// 	 */
// 	long getLogSize();
// 
// 	/**
// 	 * Set the formatter to use.
// 	 * 
// 	 * @param formatter
// 	 *            The formatter to set.
// 	 */
// 	void setFormatter(Formatter formatter);
// 
// 	/**
// 	 * Get the formatter that is in use.
// 	 * 
// 	 * @return Returns the formatter.
// 	 */
// 	Formatter getFormatter();
// 
// }
// 
// Path: src/main/java/com/github/lisicnu/log4android/factory/DefaultAppenderFactory.java
// public enum DefaultAppenderFactory {
// 	;
// 	
// 	public static Appender createDefaultAppender() {
// 		Appender appender = new LogCatAppender();
// 		appender.setFormatter(new PatternFormatter());
// 		
// 		return appender;
// 	}
// }
// 
// Path: src/main/java/com/github/lisicnu/log4android/repository/CommonLoggerRepository.java
// public interface CommonLoggerRepository {
// 	/**
// 	 * Get the effective level for the specified logger. Note that the level of
// 	 * the current logger is not checked, since this level could be get from the
// 	 * logger itself.
// 	 * 
// 	 * @return the effective <code>Level</code>
// 	 */
// 	public Level getEffectiveLevel(String loggerName);
// }


// Path: src/main/java/com/github/lisicnu/log4android/Logger.java
import android.util.Log;
import com.github.lisicnu.log4android.appender.Appender;
import com.github.lisicnu.log4android.factory.DefaultAppenderFactory;
import com.github.lisicnu.log4android.repository.CommonLoggerRepository;
import java.io.IOException;
import java.util.List;
import java.util.ListIterator;
import java.util.Vector;

/*
 * Copyright 2008 The Microlog project @sourceforge.net
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.github.lisicnu.log4android;




/**
 * The <code>Logger</code> class is used for logging.
 * <p/>
 * This is similar to the Log4j <code>Logger</code> class. The method names are
 * the same, but we do not claim that they are 100% compatible.
 * <p/>
 * You have the ability to use named loggers as in Log4j. If you want to save
 * memory, you could use unnamed loggers.
 *
 * @author Johan Karlsson (johan.karlsson@jayway.se)
 * @author Darius Katz
 * @author Karsten Ohme
 * @since 0.1
 */
public final class Logger {
    public static final Level DEFAULT_LOG_LEVEL = Level.DEBUG;
    public static final String DEFAULT_CLIENT_ID = "Microlog";
    private String clientID = DEFAULT_CLIENT_ID;
    private static final String TAG = Logger.class.getSimpleName();
    private static final StopWatch stopWatch = new StopWatch();
    private final static List<Appender> appenderList = new Vector<Appender>(4);
    private static boolean firstLogEvent = true;
    private CommonLoggerRepository commonLoggerRepository = null;