Yup, as Craig said the intention is purely to support the Servlet/Portlet APIs without directly depending on them. But for logging, the intention of the Java EE framework (as of 1.4, that is) is entirely java.util.logging. ExternalContext.log() is just one of those legacy things that we have in abundance in Java land. commons-logging is fine for products that can't require JDK 1.4 (like the spec part of MyFaces)
-- Adam On 1/10/06, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > > On 1/10/06, Manfred Geiler <[EMAIL PROTECTED]> wrote: > > >> facesContext.getExternalContext().log(); > > > > Yes, this was my first intention then, when I did not dare to add > > dependencies to other libs in the first place - one year ago, or two? > > ;-) > > > > And it again came into my mind during the current discussion. But, as > > Kalle mentioned, there are no log levels at all. So, although nifty, > > this would be a non-practicable solution. > > > > Adam, do you remember the primary idea behind adding this log method > > to the ExternalContext API? Looks to me like it is only there, because > > ServletContext does have it as well. Or is there any use case scenario > > for using this method? > > One of the primary motivations is that both ServletContext and > PortletContext have log() method signatures. As with almost everything else > in ExternalContext, JSF tries to shield you from having to explicitly > accomodate the differences between servlet and portlet APIs. > > > Now, we could request the addition of log levels for JSF 2.x. But > > then, we could also request the addition of log levels to > > ServletContext. And that would probably be too much... ;-) > > And, of course, it will be too late. Because, when JSF 2.x is out, we > > will already have thousands of commons-logging calls in our code. ;-) > > > ExternalContext.log() is defined in terms of the log() calls on the > underlying servlet and portlet APIs, which don't have such a distinction ... > but I suppose one could implement the concept anyway at the JSF level. > > > As nobody seems to be against it, I would say: > > Kickoff for commons-logging in API. > > > > Manfred > > Craig > >
