Carsten Ziegeler wrote:
Stefano Mazzocchi wrote:

Carsten Ziegeler wrote:

How about leaving everything as is and just change the default logger to be log4j instead of logkit?

Hm, yeah, why not :( It seems that everyone is using different logging approaches, so a consensus is impossible. Sigh.

Wait, not all is lost.

Let's restart with the points I think we agree upon.

1: we want to get rid of Avalon dependency
    -> get rid of logkit

2: there seems to be a general like of log4j as an implementation
    -> use log4j as a standard implementation

3: we want a logging abstraction, not be tied to a concrete impl
    -> use commons logging or UGLI

These points have brought us to almost say yes to Commons Logging + Log4j as predefined implementation.

Then I came up with proposing UGLI as an alternative abstraction, as it has the *same* advantages of commons logging without the configuration nightmare drawbacks, has some extra niceties, and is supported by log4j, which is the implementation that we tend to prefer.

Now, it seems to me that nobody is against UGLI instead of commons logging for a logging abstraction, as all things against UGLI have nothing to do with the comparison with commons logging but just about the extra features it has, which seem not so important.

Now, I propose that we use UGLI as a logging abstraction and log4j as the predefined logging package.

Here is the UGLI logging interface [1].
If you prefer commons logging over it, please write a technical motivation about it.


"
package org.apache.ugli;

public interface ULogger {

  public boolean isDebugEnabled();
  public void debug(Object msg);
  public void debug(Object parameterizedMsg, Object param1);
  public void debug(String parameterizedMsg, Object param1,
                                             Object param2);
  public void debug(Object msg, Throwable t);


public boolean isInfoEnabled(); public void info(Object msg); public void info(Object parameterizedMsg, Object param1); public void info(String parameterizedMsg, Object param1, Object param2); public void info(Object msg, Throwable t);


public boolean isWarnEnabled(); public void warn(Object msg); public void warn(Object parameterizedMsg, Object param1); public void warn(String parameterizedMsg, Object param1, Object param2); public void warn(Object msg, Throwable t);


public boolean isErrorEnabled(); public void error(Object msg); public void error(Object parameterizedMsg, Object param1); public void error(String parameterizedMsg, Object param1, Object param2); public void error(Object msg, Throwable t);

}
"

http://cvs.apache.org/viewcvs.cgi/logging-log4j/src/java/org/apache/ugli/ULogger.java?rev=1.2&view=markup

--
Nicola Ken Barozzi                   [EMAIL PROTECTED]
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------



Reply via email to