2006/unicorn/src/org/w3c/unicorn/util ClientHttpRequest.java,1.4,1.5 UCNProperties.java,1.3,1.4 LocalizedString.java,1.3,1.4 ListFiles.java,1.2,1.3

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util
In directory hutz:/tmp/cvs-serv15157/src/org/w3c/unicorn/util

Modified Files:
	ClientHttpRequest.java UCNProperties.java LocalizedString.java 
	ListFiles.java 
Log Message:
log cleanup

Index: ClientHttpRequest.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/ClientHttpRequest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ClientHttpRequest.java	22 Sep 2009 12:38:42 -0000	1.4
+++ ClientHttpRequest.java	23 Sep 2009 09:23:30 -0000	1.5
@@ -52,7 +52,7 @@
 	 * @throws IOException
 	 */
 	private void connect() throws IOException {
-		// ClientHttpRequest.logger.trace("connect");
+		// logger.trace("connect");
 		if (null == this.aOutputStream) {
 			this.aOutputStream = this.aURLConnection.getOutputStream();
 		}
@@ -67,7 +67,7 @@
 	 */
 	private void write(final char c) throws IOException {
 		this.connect();
-		ClientHttpRequest.logger.debug(c);
+		logger.debug(c);
 		this.aOutputStream.write(c);
 	}
 
@@ -80,7 +80,7 @@
 	 */
 	protected void write(final String s) throws IOException {
 		this.connect();
-		ClientHttpRequest.logger.debug(s);
+		logger.debug(s);
 		this.aOutputStream.write(s.getBytes());
 	}
 
@@ -136,7 +136,7 @@
 	 */
 	public ClientHttpRequest(final URLConnection aURLConnection)
 			throws IOException {
-		ClientHttpRequest.logger.trace("Constructor(URLConnection)");
+		logger.trace("Constructor(URLConnection)");
 		this.aURLConnection = (HttpURLConnection) aURLConnection;
 		this.aURLConnection.setRequestMethod("POST");
 		this.aURLConnection.setDoOutput(true);
@@ -153,10 +153,8 @@
 	 */
 	public ClientHttpRequest(final URL aURL) throws IOException {
 		this(aURL.openConnection());
-		ClientHttpRequest.logger.trace("Constructor(URL)");
-		if (ClientHttpRequest.logger.isDebugEnabled()) {
-			ClientHttpRequest.logger.debug("URL : " + aURL + ".");
-		}
+		logger.trace("Constructor(URL)");
+		logger.debug("URL : " + aURL + ".");
 	}
 
 	/**
@@ -168,10 +166,8 @@
 	 */
 	public ClientHttpRequest(final String sURL) throws IOException {
 		this(new URL(sURL));
-		ClientHttpRequest.logger.trace("Constructor(String)");
-		if (ClientHttpRequest.logger.isDebugEnabled()) {
-			ClientHttpRequest.logger.debug("String URL : " + sURL + ".");
-		}
+		logger.trace("Constructor(String)");
+		logger.debug("String URL : " + sURL + ".");
 	}
 
 	/**
@@ -227,7 +223,7 @@
 	 *            The new language chosen.
 	 */
 	public void setLang(final String sLang) {
-		ClientHttpRequest.logger.debug("setLang(" + sLang + ")");
+		logger.debug("setLang(" + sLang + ")");
 		this.aURLConnection.setRequestProperty("Accept-Language", sLang);
 	}
 
@@ -256,9 +252,9 @@
 	 */
 	public void setParameter(final String sName, final String sValue)
 			throws IOException {
-		ClientHttpRequest.logger.trace("setParameter(String, String)");
-		ClientHttpRequest.logger.debug("Name : " + sName + ".");
-		ClientHttpRequest.logger.debug("Value : " + sValue + ".");
+		logger.trace("setParameter(String, String)");
+		logger.debug("Name : " + sName + ".");
+		logger.debug("Value : " + sValue + ".");
 		this.boundary();
 		this.writeName(sName);
 		this.newline();
@@ -300,14 +296,10 @@
 	 */
 	public void setParameter(final String sName, final String sFileName,
 			final InputStream aInputStream, final MimeType mimeType) throws IOException {
-		ClientHttpRequest.logger
-				.trace("setParameter(String, String, InputStream)");
-		if (ClientHttpRequest.logger.isDebugEnabled()) {
-			ClientHttpRequest.logger.debug("Name : " + sName + ".");
-			ClientHttpRequest.logger.debug("File name : " + sFileName + ".");
-			ClientHttpRequest.logger.debug("InputStream : " + aInputStream
-					+ ".");
-		}
+		logger.trace("setParameter(String, String, InputStream)");
+		logger.debug("Name : " + sName + ".");
+		logger.debug("File name : " + sFileName + ".");
+		logger.debug("InputStream : " + aInputStream + ".");
 		this.boundary();
 		this.writeName(sName);
 		this.write("; filename=\"");

Index: LocalizedString.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/LocalizedString.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- LocalizedString.java	28 Aug 2009 16:11:41 -0000	1.3
+++ LocalizedString.java	23 Sep 2009 09:23:30 -0000	1.4
@@ -28,7 +28,7 @@
 	 * 
 	 */
 	public LocalizedString() {
-		LocalizedString.logger.trace("Constructor");
+		logger.trace("Constructor");
 		this.mapOfString = new LinkedHashMap<String, String>();
 	}
 
@@ -69,9 +69,9 @@
 	 *         there was no mapping for key.
 	 */
 	public String addLocalization(final String sLocale, final String sMessage) {
-		LocalizedString.logger.trace("addLocalization");
-		LocalizedString.logger.debug("Locale : " + sLocale + ".");
-		LocalizedString.logger.debug("Message : " + sMessage + ".");
+		logger.trace("addLocalization");
+		logger.debug("Locale : " + sLocale + ".");
+		logger.debug("Message : " + sMessage + ".");
 		return this.mapOfString.put(sLocale, sMessage);
 	}
 

Index: ListFiles.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/ListFiles.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ListFiles.java	28 Aug 2009 12:39:56 -0000	1.2
+++ ListFiles.java	23 Sep 2009 09:23:30 -0000	1.3
@@ -37,9 +37,9 @@
 	 */
 	public static File[] listFiles(final String sDirectory,
 			final String sFilterPattern) {//throws FileNotFoundException {
-		ListFiles.logger.trace("listFiles(String, String)");
-		ListFiles.logger.trace("Directory : " + sDirectory + ".");
-		ListFiles.logger.trace("Filter pattern : " + sFilterPattern + ".");
+		logger.trace("listFiles(String, String)");
+		logger.trace("Directory : " + sDirectory + ".");
+		logger.trace("Filter pattern : " + sFilterPattern + ".");
 
 		final File aDirectory = new File(sDirectory);
 		final Pattern aPattern = Pattern.compile(sFilterPattern);
@@ -68,10 +68,8 @@
 	 */
 	public static File[] listFiles(final String sDirectory)
 			throws FileNotFoundException {
-		ListFiles.logger.trace("listFiles(String)");
-		if (ListFiles.logger.isDebugEnabled()) {
-			ListFiles.logger.debug("Directory : " + sDirectory + ".");
-		}
+		logger.trace("listFiles(String)");
+		logger.debug("Directory : " + sDirectory + ".");
 
 		final File aDirectory = new File(sDirectory);
 		final FileFilter aFileFilter = new FileFilter() {

Index: UCNProperties.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/UCNProperties.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- UCNProperties.java	28 Aug 2009 16:11:41 -0000	1.3
+++ UCNProperties.java	23 Sep 2009 09:23:30 -0000	1.4
@@ -6,13 +6,15 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.log4j.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.w3c.unicorn.Framework;
 
 public class UCNProperties extends Properties {
 	
 	private static final long serialVersionUID = 1L;
 	
-	static Logger logger = Logger.getLogger("Framework");
+	public static Log logger = LogFactory.getLog(Framework.class);
 	
 	private Pattern pattern = Pattern.compile("\\$\\{[a-zA-Z_0-9]*\\}");
 	

Received on Wednesday, 23 September 2009 09:23:47 UTC