On Mon, 25 Feb 2002, David Winterfeldt wrote:
> Date: Mon, 25 Feb 2002 19:49:05 -0800 (PST)
> From: David Winterfeldt <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: Struts Developers List <[EMAIL PROTECTED]>
> Subject: Commons Logging
>
> I checked in what I've done so far. Commons Logging
> issues.
>
> 1. Do we want to just add console logging to the
> example web apps or log to a file?
I'm adding this for struts-example (along with updating the architecture
to reflect modern Struts design patterns, like using a DAO for the
database access).
> Are you still
> running the nightly build Craig?
Yes.
> Log4J would need to
> be added to the properties file so it can be included
> in the webapps for the binary distribution. Or we can
> activate the console logging in the Commons Logging
> pacakge.
>
I'm not opposed to including Log4J, but doesn't that mean we need to
preconfigure it as well? It seems simpler to just accept the
commons-logging defaults and let users configure their own environment
differently if they need it.
> 2. I left the log(msg) method in ActionServlet,
> ActionServletWrapper, and RequestProcessor. I
> deprecated the log method to the logWriter in
> GenericDataSource and switched the class itself to use
> Commons Logging. MessageResources log method logs to
> Commons Logging. That method was logging to
> System.out, but since other people are calling the
> other log methods and they are at least being written
> to a file I wasn't sure if they should be changed to
> Commons Logging.
>
OK, although I don't really think log() needs to be deprecated, since it
just passes the message on to a feature that is part of the standard
Servlet API.
> 3. appConfig.getServlet().getDebug()
> I didn't change this. I'm not sure how this fits
> in with adding Commons Logging. I left this as the
> conditional, but change the logging inside to
> log.debug.
>
Part of the same issue.
> Files updated.
> src/share/org/apache/struts/action/ActionServlet.java
> src/share/org/apache/struts/action/RequestProcessor.java
> src/share/org/apache/struts/actions/DispatchAction.java
> src/share/org/apache/struts/upload/DiskMultipartRequestHandler.java
> src/share/org/apache/struts/util/GenericDataSource.java
> src/share/org/apache/struts/util/MessageResources.java
> src/share/org/apache/struts/util/MessageResourcesFactory.java
> src/share/org/apache/struts/util/RequestUtils.java
>
> Another sidenote is that commons-services.jar and
> commons-validator.jar are in the build.xml, but not in
> the build.properties.sample file. I was going to fix
> this, but I didn't want to break the nightly build.
>
Go ahead ... build.properties.sample is just that -- a sample -- it's not
actually used in the nightly build process. I've got these JAR files
defined in my ${user.home}/build.properties file anyway.
> David
>
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>