You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Curt Arnold <ca...@apache.org> on 2009/08/05 05:16:38 UTC

Marking org.apache.log4j.RollingFileAppender and DRFA as deprecated?

I'm planning on spending a few hours each night on log4j to finally  
cut a log4j 1.2.16.

There are a decent number of bugs regarding  
org.apache.log4j.RollingFileAppender or  
org.apache.log4j.DailyRollingFileAppender.  I'll look at the bug  
reports and see if there are any simple, low-risk fixes, but not sure  
that there will be.  org.apache.log4j.rolling.RollingFileAppender has  
some problems, but not as many as the org.apache.log4j RFA's.

Is it time to mark org.apache.log4j.RFA and DRFA as deprecated and  
suggest that users migrate to the RFA's in the extras companion?

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: Marking org.apache.log4j.RollingFileAppender and DRFA as deprecated?

Posted by Jess Holle <je...@ptc.com>.
I think that conceptually and practically the old RFA and DRFA are 
limited to being written to by a single process -- period.  It should 
simply be stated that all bets are off otherwise, use at your own risk, 
etc -- and to use a new ChannelAppender-based appender instead.

How many outstanding issues do RFA and DRFA have once one limits oneself 
to a single process?  I'd hope that for *that* use case use of these 
appenders themselves (as opposed to the trouble one can cause in 
subclasses) would be safe from deadlocks, etc -- or could be made so.  
Any improvement beyond this should be a non-goal for these old 
appenders, but I'd hope to accomplish this goal.

Personally I see a whole class of logging wherein one simply does not 
want multiple processes contributing to one file -- period.  We ensure 
this does not happen in our usage -- unless an errant user 
mis-configures the system.  I can see use cases for multiple-processes 
writing to one file, but I'd personally rather avoid the extra 
contention inherent in this.

--
Jess Holle

Curt Arnold wrote:
> On Aug 7, 2009, at 2:16 AM, Scott Deboy wrote:
>> Is it possible to use the new implementation and provide the same 
>> extension points that the old implementation provided?
>>
>> Scott
> I don't think so, so much of the internals of RFA and DRFA were 
> exposed that you can't change much without potentially breaking someone.
>
> Any appender that relies on renaming is going to trouble-prone and 
> java.io doesn't provide any way to handle writes from multiple JVM's 
> (which is the one of the major source of issues with all of the 
> RFA's).  To have a really robust appender that writes across files, I 
> think something like MFA but rewritten to be based on java.nio would 
> be needed.  We could push it into log4j 1.x when it is ready as an 
> alternative to RFA and DRFA.  It would require JDK 1.4 to run, but I 
> don't think it would prevent the rest of log4j to run on JDK 1.3.
>
> The base would be a ChannelAppender that would be the basis of 
> java.nio based appenders like WriterAppender is for java.io appenders.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: Marking org.apache.log4j.RollingFileAppender and DRFA as deprecated?

Posted by Curt Arnold <ca...@apache.org>.
On Aug 7, 2009, at 2:16 AM, Scott Deboy wrote:

> Is it possible to use the new implementation and provide the same  
> extension points that the old implementation provided?
>
> Scott
>

I don't think so, so much of the internals of RFA and DRFA were  
exposed that you can't change much without potentially breaking someone.

Any appender that relies on renaming is going to trouble-prone and  
java.io doesn't provide any way to handle writes from multiple JVM's  
(which is the one of the major source of issues with all of the  
RFA's).  To have a really robust appender that writes across files, I  
think something like MFA but rewritten to be based on java.nio would  
be needed.  We could push it into log4j 1.x when it is ready as an  
alternative to RFA and DRFA.  It would require JDK 1.4 to run, but I  
don't think it would prevent the rest of log4j to run on JDK 1.3.

The base would be a ChannelAppender that would be the basis of  
java.nio based appenders like WriterAppender is for java.io appenders.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: Marking org.apache.log4j.RollingFileAppender and DRFA as deprecated?

Posted by Scott Deboy <sc...@gmail.com>.
Is it possible to use the new implementation and provide the same extension
points that the old implementation provided?

Scott

On Thu, Aug 6, 2009 at 10:24 PM, Curt Arnold <ca...@apache.org> wrote:

>
> On Aug 6, 2009, at 2:13 PM, Scott Deboy wrote:
>
>  I think the rolling file appenders are some of the most commonly used
>> appenders.  If you require folks to configure two jars instead of one in
>> their classpath for one of the most common uses of log4j, it's a step
>> backward in my opinion.
>>
>> Ideally, we could change the existing RFA and DRFA to delegate to the new
>> RFAs (if they were in the same jar).
>>
>> Is that possible?
>>
>> Scott
>>
>>
> @deprecate is too strong, I just meant to add wording to indicate that
> there are known problems that are difficult to address and that users should
> consider the org.apache.log4j.rolling.RFA, some of the third-party RFA's and
> hopefully eventually a .nio. based channel appender based on the
> MultiFileAppender work.
>
> log4j 1.3 implemented o.a.l.RFA and DRFA as delegates to o.a.l.r.RFA.  They
> configured identically, however the extension points were different, so if
> you had extended DRFA in log4j 1.2, your extension would not work properly
> in log4j 1.3.
>
> To insure compatibility with apps that extended o.a.l.RFA and DRFA, we have
> to thread very carefully not to disrupt those users that have worked around
> the issues or have extended the behavior.  However, if you were starting
> new, they have really should start with something else.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

Re: Marking org.apache.log4j.RollingFileAppender and DRFA as deprecated?

Posted by Curt Arnold <ca...@apache.org>.
On Aug 6, 2009, at 2:13 PM, Scott Deboy wrote:

> I think the rolling file appenders are some of the most commonly  
> used appenders.  If you require folks to configure two jars instead  
> of one in their classpath for one of the most common uses of log4j,  
> it's a step backward in my opinion.
>
> Ideally, we could change the existing RFA and DRFA to delegate to  
> the new RFAs (if they were in the same jar).
>
> Is that possible?
>
> Scott
>

@deprecate is too strong, I just meant to add wording to indicate that  
there are known problems that are difficult to address and that users  
should consider the org.apache.log4j.rolling.RFA, some of the third- 
party RFA's and hopefully eventually a .nio. based channel appender  
based on the MultiFileAppender work.

log4j 1.3 implemented o.a.l.RFA and DRFA as delegates to o.a.l.r.RFA.   
They configured identically, however the extension points were  
different, so if you had extended DRFA in log4j 1.2, your extension  
would not work properly in log4j 1.3.

To insure compatibility with apps that extended o.a.l.RFA and DRFA, we  
have to thread very carefully not to disrupt those users that have  
worked around the issues or have extended the behavior.  However, if  
you were starting new, they have really should start with something  
else.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: Marking org.apache.log4j.RollingFileAppender and DRFA as deprecated?

Posted by Scott Deboy <sc...@gmail.com>.
I think the rolling file appenders are some of the most commonly used
appenders.  If you require folks to configure two jars instead of one in
their classpath for one of the most common uses of log4j, it's a step
backward in my opinion.

Ideally, we could change the existing RFA and DRFA to delegate to the new
RFAs (if they were in the same jar).

Is that possible?

Scott


On Thu, Aug 6, 2009 at 11:55 AM, Gilles Scokart <gs...@gmail.com> wrote:

> I hope will manage to keep it alive.  Despite all the bugs, it is a very
> usefull appender that are very often used.
>
> By the way, if you prepare 1.2.16, it would be nice to have the pacth of
> https://issues.apache.org/bugzilla/show_bug.cgi?id=47350 included.
>
> Gilles Scokart
>
>
> 2009/8/5 Curt Arnold <ca...@apache.org>
>
> I'm planning on spending a few hours each night on log4j to finally cut a
>> log4j 1.2.16.
>>
>> There are a decent number of bugs regarding
>> org.apache.log4j.RollingFileAppender or
>> org.apache.log4j.DailyRollingFileAppender.  I'll look at the bug reports and
>> see if there are any simple, low-risk fixes, but not sure that there will
>> be.  org.apache.log4j.rolling.RollingFileAppender has some problems, but not
>> as many as the org.apache.log4j RFA's.
>>
>> Is it time to mark org.apache.log4j.RFA and DRFA as deprecated and suggest
>> that users migrate to the RFA's in the extras companion?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>

Re: Marking org.apache.log4j.RollingFileAppender and DRFA as deprecated?

Posted by Gilles Scokart <gs...@gmail.com>.
I hope will manage to keep it alive.  Despite all the bugs, it is a very
usefull appender that are very often used.

By the way, if you prepare 1.2.16, it would be nice to have the pacth of
https://issues.apache.org/bugzilla/show_bug.cgi?id=47350 included.

Gilles Scokart


2009/8/5 Curt Arnold <ca...@apache.org>

> I'm planning on spending a few hours each night on log4j to finally cut a
> log4j 1.2.16.
>
> There are a decent number of bugs regarding
> org.apache.log4j.RollingFileAppender or
> org.apache.log4j.DailyRollingFileAppender.  I'll look at the bug reports and
> see if there are any simple, low-risk fixes, but not sure that there will
> be.  org.apache.log4j.rolling.RollingFileAppender has some problems, but not
> as many as the org.apache.log4j RFA's.
>
> Is it time to mark org.apache.log4j.RFA and DRFA as deprecated and suggest
> that users migrate to the RFA's in the extras companion?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>