[slf4j-dev] Re: Beta 4 and the new method signatures

Ceki Gülcü listid at qos.ch
Mon Jul 11 19:00:29 CEST 2005


To be more specific, say the thin API is:

public interface Log {
  public boolean isEnabled();
  public void log(Object);
}

For developers logs, one can case String instances to Object. For
request logs, you'd need to cast a HttpRequest, HttpResponse pair into
object, which cannot be done unless the server developer creates an
object array of size two:

   logger.log(new Array[] {request, request});

Admittedly, this is feasible. However, as far as the logging system is
concerned, if it is generic, it now has to deal with two objects of
fundamentally different nature. Do you see why it's a road to avoid?


-- 
Ceki Gülcü

   The complete log4j manual: http://www.qos.ch/log4j/





More information about the slf4j-dev mailing list