Log接口的定义如下: package org.apache.commons.logging; public interface Log { // ----------------------------------------------------- Logging Properties /** * <p> Is debug logging currently enabled? </p> * * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than debug. </p> * * @return true if debug is enabled in the underlying logger. */ public boolean isDebugEnabled(); /** * <p> Is error logging currently enabled? </p> * * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than error. </p> * * @return true if error is enabled in the underlying logger. */ public boolean isErrorEnabled(); /** * <p> Is fatal logging currently enabled? </p> * * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than fatal. </p> * * @return true if fatal is enabled in the underlying logger. */ public boolean isFatalEnabled(); /** * <p> Is info logging currently enabled? </p> * * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than info. </p> * * @return true if info is enabled in the underlying logger. */ public boolean isInfoEnabled(); /** * <p> Is trace logging currently enabled? </p> * * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than trace. </p> * * @return true if trace is enabled in the underlying logger. */ public boolean isTraceEnabled(); /** * <p> Is warn logging currently enabled? </p> * * <p> Call this method to prevent having to perform expensive operations * (for example, <code>String</code> concatenation) * when the log level is more than warn. </p> * * @return true if warn is enabled in the underlying logger. */ public boolean isWarnEnabled(); // -------------------------------------------------------- Logging Methods /** * <p> Log a message with trace log level. </p> * * @param message log this message */ public void trace(Object message); /** * <p> Log an error with trace log level. </p> * * @param message log this message * @param t log this cause */ public void trace(