// Path: org/knapsack/shell/StringConstants.java
// public final class StringConstants {
// 
// 	/**
// 	 * The system character or characters to signify a new line.
// 	 */
// 	public static final String CRLF = System.getProperty("line.separator");
// 	
// 	/**
// 	 * Character for tab.
// 	 */
// 	public static final String TAB = " \t";
// 
// 
// 
// }


import org.osgi.service.log.LogListener;
import org.osgi.service.log.LogReaderService;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.knapsack.shell.StringConstants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogEntry;
		if (enabled)
			doKnapsackLog(bundle, sr, level, msg, throwable);
	}
	
	/* (non-Javadoc)
	 * @see org.apache.felix.framework.Logger#setSystemBundleContext(org.osgi.framework.BundleContext)
	 */
	protected void setSystemBundleContext(BundleContext context) {
	    super.setSystemBundleContext(context);
	}
	
	/**
	 * Print a log entry in the knapsack style.
	 * @param bundle
	 * @param sr
	 * @param level
	 * @param msg
	 * @param throwable
	 */
	public static void doKnapsackLog(Bundle bundle, ServiceReference sr, int level, String msg, Throwable throwable) {
		if (dateFormatter == null)
			dateFormatter = new SimpleDateFormat(DEFAULT_DATE_FORMAT);
		
		StringBuilder sb = new StringBuilder();
		
		sb.append(dateFormatter.format(new Date(System.currentTimeMillis())));
		sb.append(' ');
		getLevelLabel(level, sb);
		sb.append(' ');
		sb.append(msg);
// Path: org/knapsack/shell/StringConstants.java
// public final class StringConstants {
// 
// 	/**
// 	 * The system character or characters to signify a new line.
// 	 */
// 	public static final String CRLF = System.getProperty("line.separator");
// 	
// 	/**
// 	 * Character for tab.
// 	 */
// 	public static final String TAB = " \t";
// 
// 
// 
// }


// Path: org/knapsack/KnapsackLogger.java
import org.osgi.service.log.LogListener;
import org.osgi.service.log.LogReaderService;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.knapsack.shell.StringConstants;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogEntry;

		if (enabled)
			doKnapsackLog(bundle, sr, level, msg, throwable);
	}
	
	/* (non-Javadoc)
	 * @see org.apache.felix.framework.Logger#setSystemBundleContext(org.osgi.framework.BundleContext)
	 */
	protected void setSystemBundleContext(BundleContext context) {
	    super.setSystemBundleContext(context);
	}
	
	/**
	 * Print a log entry in the knapsack style.
	 * @param bundle
	 * @param sr
	 * @param level
	 * @param msg
	 * @param throwable
	 */
	public static void doKnapsackLog(Bundle bundle, ServiceReference sr, int level, String msg, Throwable throwable) {
		if (dateFormatter == null)
			dateFormatter = new SimpleDateFormat(DEFAULT_DATE_FORMAT);
		
		StringBuilder sb = new StringBuilder();
		
		sb.append(dateFormatter.format(new Date(System.currentTimeMillis())));
		sb.append(' ');
		getLevelLabel(level, sb);
		sb.append(' ');
		sb.append(msg);
		sb.append(StringConstants.TAB);