Hey guys,

Might also be a good time to discuss Bug 19140 (RFE: switch to commons-logging)
   http://issues.apache.org/bugzilla/show_bug.cgi?id=19140

Then, we can remove the whole Log4j dependency.  :)

On Mon, 7 Mar 2005 23:43:24 -0600, Curt Arnold <[EMAIL PROTECTED]> wrote:
> I'm a log4j committer and have been investigating Gump projects that
> have been configured to use log4j 1.2 instead of tracking the
> development leading to log4j 1.3.
> 
> From a quick review of the mailing list and the code, the only thing
> that appears to prevent the building velocity using log4j 1.3 is the
> use of the org.apache.log4j.RollingFileAppender class which has been
> replaced by the org.apache.log4j.rolling.RollingFileAppender class.
> The new .rolling.RollingFileAppender is substantially improved,
> unfortunately at the moment there is no bridge to allow code using the
> log4j 1.2 RFA to work with 1.3.
> 
> I've floated a proposal on log4j-dev to add an emulator of the old RFA
> in 1.3 that would delegate to the new RFA implementation.  Would this
> be sufficient to address the issues that motivated the setting the Gump
> configuration to using log4j 1.2?  Is abandoning log4j 1.2 an option?
> Is there another approach you would recommend?
> 
> When I first looked at the Velocity code, I thought that its use of the
> ancient, long deprecated, Category class would cause compilation
> problems with log4j 1.3.  However, I was surprised to learn that they
> were still exposed in log4j 1.3, however that may be subject to change.
>  The Logger class replaced Category way back in 2001.  The following
> changes should work fine with any post-2001 version of log4j.
> 
> RCS file:
> /home/cvspublic/jakarta-velocity/examples/logger_example/
> Log4jCategoryExample.java,v
> retrieving revision 1.3
> diff -r1.3 Log4jCategoryExample.java
> 20c20
> < import org.apache.log4j.Category;
> ---
> > import org.apache.log4j.Logger;
> 44c44
> <         Category log = Category.getInstance( CATEGORY_NAME );
> ---
> >         Logger log = Logger.getLogger( CATEGORY_NAME );
> Index:
> src/java/org/apache/velocity/runtime/log/SimpleLog4JLogSystem.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-velocity/src/java/org/apache/velocity/runtime/
> log/SimpleLog4JLogSystem.java,v
> retrieving revision 1.11
> diff -r1.11 SimpleLog4JLogSystem.java
> 21,22c21,22
> < import org.apache.log4j.Category;
> ---
> > import org.apache.log4j.Logger;
> 51c51
> <     protected Category logger = null;
> ---
> >     protected Logger logger = null;
> 70c70
> <             logger = Category.getInstance( categoryname );
> ---
> >             logger = Logger.getLogger( categoryname );
> 112c112
> <         logger = Category.getInstance(this.getClass().getName());
> ---
> >         logger = Logger.getLogger(this.getClass().getName());

Best regards,
-- Shinobu

--
Shinobu Kawai <[EMAIL PROTECTED]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to