removing assert(), since that's a reserved keyword in JDK 1.4
we can add it back later once log4j settles on a new method name git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@138809 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -11,10 +11,9 @@ package org.apache.commons.httpclient.log;
|
|||||||
/**
|
/**
|
||||||
* A simple logging interface abstracting log4j.
|
* A simple logging interface abstracting log4j.
|
||||||
* @author Rod Waldhoff
|
* @author Rod Waldhoff
|
||||||
* @version $Id: Log.java,v 1.2 2001/08/02 22:14:41 rwaldhoff Exp $
|
* @version $Id: Log.java,v 1.3 2001/08/07 17:37:22 rwaldhoff Exp $
|
||||||
*/
|
*/
|
||||||
public interface Log {
|
public interface Log {
|
||||||
public void assert(boolean assertion, String msg);
|
|
||||||
public void debug(Object message);
|
public void debug(Object message);
|
||||||
public void debug(Object message, Throwable t);
|
public void debug(Object message, Throwable t);
|
||||||
public void info(Object message);
|
public void info(Object message);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.apache.log4j.Priority;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Rod Waldhoff
|
* @author Rod Waldhoff
|
||||||
* @version $Id: Log4JCategoryLog.java,v 1.2 2001/08/02 22:14:41 rwaldhoff Exp $
|
* @version $Id: Log4JCategoryLog.java,v 1.3 2001/08/07 17:37:22 rwaldhoff Exp $
|
||||||
*/
|
*/
|
||||||
public class Log4JCategoryLog implements Log {
|
public class Log4JCategoryLog implements Log {
|
||||||
Category _category = null;
|
Category _category = null;
|
||||||
@@ -22,10 +22,6 @@ public class Log4JCategoryLog implements Log {
|
|||||||
_category = Category.getInstance(name);
|
_category = Category.getInstance(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void assert(boolean assertion, String msg) {
|
|
||||||
_category.assert(assertion,msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
public final void debug(Object message) {
|
public final void debug(Object message) {
|
||||||
_category.debug(message);
|
_category.debug(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ package org.apache.commons.httpclient.log;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Rod Waldhoff
|
* @author Rod Waldhoff
|
||||||
* @version $Id: NoOpLog.java,v 1.2 2001/08/02 22:14:41 rwaldhoff Exp $
|
* @version $Id: NoOpLog.java,v 1.3 2001/08/07 17:37:22 rwaldhoff Exp $
|
||||||
*/
|
*/
|
||||||
public final class NoOpLog implements Log {
|
public final class NoOpLog implements Log {
|
||||||
public NoOpLog() { }
|
public NoOpLog() { }
|
||||||
public NoOpLog(String name) { }
|
public NoOpLog(String name) { }
|
||||||
public void assert(boolean assertion, String msg) { }
|
|
||||||
public void debug(Object message) { }
|
public void debug(Object message) { }
|
||||||
public void debug(Object message, Throwable t) { }
|
public void debug(Object message, Throwable t) { }
|
||||||
public void info(Object message) { }
|
public void info(Object message) { }
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import java.util.Date;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Rod Waldhoff
|
* @author Rod Waldhoff
|
||||||
* @version $Id: SimpleLog.java,v 1.2 2001/08/02 22:14:41 rwaldhoff Exp $
|
* @version $Id: SimpleLog.java,v 1.3 2001/08/07 17:37:22 rwaldhoff Exp $
|
||||||
*/
|
*/
|
||||||
public class SimpleLog implements Log {
|
public class SimpleLog implements Log {
|
||||||
static protected final Properties _simplelogProps = new Properties();
|
static protected final Properties _simplelogProps = new Properties();
|
||||||
@@ -120,10 +120,6 @@ public class SimpleLog implements Log {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void assert(boolean assertion, String msg) {
|
|
||||||
if(!assertion) { error(msg); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public final void debug(Object message) {
|
public final void debug(Object message) {
|
||||||
log(DEBUG,message,null);
|
log(DEBUG,message,null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user