// Path: src/main/java/com/github/lisicnu/log4android/Level.java
// public enum Level {
// 	FATAL(Level.FATAL_INT),
// 	ERROR(Level.ERROR_INT),
// 	WARN(Level.WARN_INT),
// 	INFO(Level.INFO_INT),
// 	DEBUG(Level.DEBUG_INT),
// 	TRACE(Level.TRACE_INT),
// 	OFF(Level.OFF_INT);
// 	
// 	public static final int FATAL_INT = 16;
// 	public static final int ERROR_INT = 8;
// 	public static final int WARN_INT = 4;
// 	public static final int INFO_INT = 2;
// 	public static final int DEBUG_INT = 1;
// 	public static final int TRACE_INT = 0;
// 	public static final int OFF_INT = -1;
// 	
// 	private final int levelValue;
// 	
// 	private Level(final int levelValue) {
// 		this.levelValue = levelValue;
// 	}
// 	
// 	public int toInt() {
// 		return levelValue;
// 	}
// 	
// 	public String toString() {
// 		return this.name();
// 	}
// }


import com.github.lisicnu.log4android.Level;
/**
 * 
 */
package com.github.lisicnu.log4android.appender;



/**
 * 
 * @author Johan Karlsson
 *
 */
public class SyslogAppender extends DatagramAppender {
	
	private SyslogMessage syslogMessage = new SyslogMessage();
	
	public SyslogAppender(){
		super.setPort(SyslogMessage.DEFAULT_SYSLOG_PORT);
		
		syslogMessage.setTag(SyslogMessage.DEFAULT_SYSLOG_TAG);
		syslogMessage.setFacility(SyslogMessage.FACILITY_USER_LEVEL_MESSAGE);
		syslogMessage.setSeverity(SyslogMessage.SEVERITY_DEBUG);
	}
	
	/**
	 * Do the logging.
	 * @param level
	 *            the level to use for the logging.
	 * @param message
	 *            the message to log.
	 * @param t
	 *            the exception to log.
	 */
// Path: src/main/java/com/github/lisicnu/log4android/Level.java
// public enum Level {
// 	FATAL(Level.FATAL_INT),
// 	ERROR(Level.ERROR_INT),
// 	WARN(Level.WARN_INT),
// 	INFO(Level.INFO_INT),
// 	DEBUG(Level.DEBUG_INT),
// 	TRACE(Level.TRACE_INT),
// 	OFF(Level.OFF_INT);
// 	
// 	public static final int FATAL_INT = 16;
// 	public static final int ERROR_INT = 8;
// 	public static final int WARN_INT = 4;
// 	public static final int INFO_INT = 2;
// 	public static final int DEBUG_INT = 1;
// 	public static final int TRACE_INT = 0;
// 	public static final int OFF_INT = -1;
// 	
// 	private final int levelValue;
// 	
// 	private Level(final int levelValue) {
// 		this.levelValue = levelValue;
// 	}
// 	
// 	public int toInt() {
// 		return levelValue;
// 	}
// 	
// 	public String toString() {
// 		return this.name();
// 	}
// }


// Path: src/main/java/com/github/lisicnu/log4android/appender/SyslogAppender.java
import com.github.lisicnu.log4android.Level;

/**
 * 
 */
package com.github.lisicnu.log4android.appender;



/**
 * 
 * @author Johan Karlsson
 *
 */
public class SyslogAppender extends DatagramAppender {
	
	private SyslogMessage syslogMessage = new SyslogMessage();
	
	public SyslogAppender(){
		super.setPort(SyslogMessage.DEFAULT_SYSLOG_PORT);
		
		syslogMessage.setTag(SyslogMessage.DEFAULT_SYSLOG_TAG);
		syslogMessage.setFacility(SyslogMessage.FACILITY_USER_LEVEL_MESSAGE);
		syslogMessage.setSeverity(SyslogMessage.SEVERITY_DEBUG);
	}
	
	/**
	 * Do the logging.
	 * @param level
	 *            the level to use for the logging.
	 * @param message
	 *            the message to log.
	 * @param t
	 *            the exception to log.
	 */
	public void doLog(String clientID, String name, long time, Level level,