You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Don Taylor <do...@yahoo.com> on 2001/08/13 04:20:45 UTC

Re: daily log file question (code submission)

Attached is a jar file containing
org.apache.log4j.DailyRollingFileAppenderExt addressing the five points
I mentioned below. The source and javadoc is also in the jar. To use,
you can simply mount the jar.

I want to work on a version that would make point 2 optional, i.e. to
allow functionality like DailyRollingFileAppender.

Enjoy.

-- Don

--- Ceki G�lc� <cg...@qos.ch> wrote:
> At 09:31 08.08.2001 -0700, Don Taylor wrote:
> >--- Aron Kramlik <ar...@itouch.com.au> wrote:
> >> Hi,
> >> 
> >> I would like to ask if the DailyRollingFileAppender is the class
> that
> >> is
> >> meant to be used for log files that need to be rolled every day.
> >
> >It is.
> >
> >> I have seen some discussion in the archives and I am not sure it
> >> is production ready from the discussions - could you please advise
> >> if this is considered ready to be used in production?  Also, a
> simple
> >> example, or pointer to an example, of how one can go about using
> it.
> >> 
> >> Thanks,
> >> 
> >> Aron Kramlik
> >> aron.kramlik@itouch.com.au
> >> 
> >
> >Most of the discussion involves it not working the way you really
> want.
> >I have a version that's in production that does what most people
> want,
> >but it's only been in production a couple of weeks. I'm planning on
> >posting it to the group this weekend, after it's cleaned-up some
> >(getting it up to the coding standards, placing it in the right
> >package, and so on.) In the meantime, go ahead and use the existing
> >DailyRollingFileAppender.
> >
> >The problems my version resolves:
> >
> >1. DailyRollingFileAppender will not rollover the log file if the
> >application isn't running at the time of the rollover.
> >
> >(Actually, a fix to this has already been posted. I've just
> >incorporated it in my version.)
> 
> Good.
> 
> >2. DailyRollingFileAppender does not use the date/time stamp in the
> >file name for the currently active logging file.
> 
> Yes, this was suggested as a change. However, some users need the
> behavior to remain the same.
> 
> >3. DailyRollingFileAppender always appends the date/time stamp to
> the
> >filename, rather than determining if an extension exists and
> inserting
> >the date/time stamp just before the extension. This really helps
> when
> >viewing the log file in extension-oriented systems such as Windows.
> 
> Makes sense.
> 
> >4. DailyRollingFileAppender does not limit the maximum number of
> logs
> >that can be created. It'll create logs forever. My version does the
> >same thing, but you can optionally set a limit. (You can't limit the
> >size, only the number.)
> 
> Seems reasonable.
> 
> >5. DailyRollingFileAppender doesn't work well with layouts such as
> >HTMLLayout. Everytime you start a logging session a header is sent
> to
> >the log. That makes an HTML file a mess. My version allows you to
> >specify how to handle the header when appending to an
> already-existing
> >log.
> 
> Good point.
> 
> >Is DailyRollingFileAppender ready for production? Sure, just pay
> >attention to the caveats. If you're interested in my version, give
> me a
> >couple of days to clean it up and get it posted. In the meantime,
> just
> >use DailyRollingFileAppender.
> 
> Please post it when you are done. Ceki
> 
> --
> Ceki G�lc� - http://qos.ch
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

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


Re: daily log file question (code submission)

Posted by Eddie Post <po...@hotmail.com>.
Ceki,

When will this DailyRollingFileAppender roll-over (point 1 below) fix made
available in the log4j-core.jar.

Eddie


----- Original Message -----
From: Don Taylor <do...@yahoo.com>
To: LOG4J Users Mailing List <lo...@jakarta.apache.org>
Sent: Wednesday, August 22, 2001 1:27 PM
Subject: Re: daily log file question (code submission)


> Sorry about losing the original author's names. I'd also like to give
> credit to the fellow who submitted the fix forcing the rollover if
> appropriate at startup, because his code is in there also, and I copied
> it straight from his submission.
>
> When I get around to resolving point 2 should I submit that as a patch?
> How does that work?
>
> -- Don
>
> --- Ceki Gülcü <cg...@qos.ch> wrote:
> >
> > Don,
> >
> > Well done!
> >
> > I would have preferred to see the original author names be retained
> > but that is is easy enough to remedy. Thanks for your contribution.
> > Ceki
> >
> > At 19:20 12.08.2001 -0700, Don Taylor wrote:
> > >Attached is a jar file containing
> > >org.apache.log4j.DailyRollingFileAppenderExt addressing the five
> > points
> > >I mentioned below. The source and javadoc is also in the jar. To
> > use,
> > >you can simply mount the jar.
> > >
> > >I want to work on a version that would make point 2 optional, i.e.
> > to
> > >allow functionality like DailyRollingFileAppender.
> > >
> > >Enjoy.
> > >
> > >-- Don
> > >
> > >--- Ceki Gülcü <cg...@qos.ch> wrote:
> > >> At 09:31 08.08.2001 -0700, Don Taylor wrote:
> > >> >--- Aron Kramlik <ar...@itouch.com.au> wrote:
> > >> >> Hi,
> > >> >>
> > >> >> I would like to ask if the DailyRollingFileAppender is the
> > class
> > >> that
> > >> >> is
> > >> >> meant to be used for log files that need to be rolled every
> > day.
> > >> >
> > >> >It is.
> > >> >
> > >> >> I have seen some discussion in the archives and I am not sure
> > it
> > >> >> is production ready from the discussions - could you please
> > advise
> > >> >> if this is considered ready to be used in production?  Also, a
> > >> simple
> > >> >> example, or pointer to an example, of how one can go about
> > using
> > >> it.
> > >> >>
> > >> >> Thanks,
> > >> >>
> > >> >> Aron Kramlik
> > >> >> aron.kramlik@itouch.com.au
> > >> >>
> > >> >
> > >> >Most of the discussion involves it not working the way you really
> > >> want.
> > >> >I have a version that's in production that does what most people
> > >> want,
> > >> >but it's only been in production a couple of weeks. I'm planning
> > on
> > >> >posting it to the group this weekend, after it's cleaned-up some
> > >> >(getting it up to the coding standards, placing it in the right
> > >> >package, and so on.) In the meantime, go ahead and use the
> > existing
> > >> >DailyRollingFileAppender.
> > >> >
> > >> >The problems my version resolves:
> > >> >
> > >> >1. DailyRollingFileAppender will not rollover the log file if the
> > >> >application isn't running at the time of the rollover.
> > >> >
> > >> >(Actually, a fix to this has already been posted. I've just
> > >> >incorporated it in my version.)
> > >>
> > >> Good.
> > >>
> > >> >2. DailyRollingFileAppender does not use the date/time stamp in
> > the
> > >> >file name for the currently active logging file.
> > >>
> > >> Yes, this was suggested as a change. However, some users need the
> > >> behavior to remain the same.
> > >>
> > >> >3. DailyRollingFileAppender always appends the date/time stamp to
> > >> the
> > >> >filename, rather than determining if an extension exists and
> > >> inserting
> > >> >the date/time stamp just before the extension. This really helps
> > >> when
> > >> >viewing the log file in extension-oriented systems such as
> > Windows.
> > >>
> > >> Makes sense.
> > >>
> > >> >4. DailyRollingFileAppender does not limit the maximum number of
> > >> logs
> > >> >that can be created. It'll create logs forever. My version does
> > the
> > >> >same thing, but you can optionally set a limit. (You can't limit
> > the
> > >> >size, only the number.)
> > >>
> > >> Seems reasonable.
> > >>
> > >> >5. DailyRollingFileAppender doesn't work well with layouts such
> > as
> > >> >HTMLLayout. Everytime you start a logging session a header is
> > sent
> > >> to
> > >> >the log. That makes an HTML file a mess. My version allows you to
> > >> >specify how to handle the header when appending to an
> > >> already-existing
> > >> >log.
> > >>
> > >> Good point.
> > >>
> > >> >Is DailyRollingFileAppender ready for production? Sure, just pay
> > >> >attention to the caveats. If you're interested in my version,
> > give
> > >> me a
> > >> >couple of days to clean it up and get it posted. In the meantime,
> > >> just
> > >> >use DailyRollingFileAppender.
> > >>
> > >> Please post it when you are done. Ceki
> > >>
> > >> --
> > >> Ceki Gülcü - http://qos.ch
> > >>
> > >>
> > >>
> > ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> > >> For additional commands, e-mail:
> > log4j-user-help@jakarta.apache.org
> > >>
> > >
> > >
> > >__________________________________________________
> > >Do You Yahoo!?
> > >Send instant messages & get email alerts with Yahoo! Messenger.
> > >http://im.yahoo.com/
> > >
> >
> >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> >
> > --
> > Ceki Gülcü - http://qos.ch
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org

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


Re: daily log file question (code submission)

Posted by Don Taylor <do...@yahoo.com>.
Sorry about losing the original author's names. I'd also like to give
credit to the fellow who submitted the fix forcing the rollover if
appropriate at startup, because his code is in there also, and I copied
it straight from his submission.

When I get around to resolving point 2 should I submit that as a patch?
How does that work?

-- Don

--- Ceki G�lc� <cg...@qos.ch> wrote:
> 
> Don,
> 
> Well done!
> 
> I would have preferred to see the original author names be retained
> but that is is easy enough to remedy. Thanks for your contribution.
> Ceki
> 
> At 19:20 12.08.2001 -0700, Don Taylor wrote:
> >Attached is a jar file containing
> >org.apache.log4j.DailyRollingFileAppenderExt addressing the five
> points
> >I mentioned below. The source and javadoc is also in the jar. To
> use,
> >you can simply mount the jar.
> >
> >I want to work on a version that would make point 2 optional, i.e.
> to
> >allow functionality like DailyRollingFileAppender.
> >
> >Enjoy.
> >
> >-- Don
> >
> >--- Ceki G�lc� <cg...@qos.ch> wrote:
> >> At 09:31 08.08.2001 -0700, Don Taylor wrote:
> >> >--- Aron Kramlik <ar...@itouch.com.au> wrote:
> >> >> Hi,
> >> >> 
> >> >> I would like to ask if the DailyRollingFileAppender is the
> class
> >> that
> >> >> is
> >> >> meant to be used for log files that need to be rolled every
> day.
> >> >
> >> >It is.
> >> >
> >> >> I have seen some discussion in the archives and I am not sure
> it
> >> >> is production ready from the discussions - could you please
> advise
> >> >> if this is considered ready to be used in production?  Also, a
> >> simple
> >> >> example, or pointer to an example, of how one can go about
> using
> >> it.
> >> >> 
> >> >> Thanks,
> >> >> 
> >> >> Aron Kramlik
> >> >> aron.kramlik@itouch.com.au
> >> >> 
> >> >
> >> >Most of the discussion involves it not working the way you really
> >> want.
> >> >I have a version that's in production that does what most people
> >> want,
> >> >but it's only been in production a couple of weeks. I'm planning
> on
> >> >posting it to the group this weekend, after it's cleaned-up some
> >> >(getting it up to the coding standards, placing it in the right
> >> >package, and so on.) In the meantime, go ahead and use the
> existing
> >> >DailyRollingFileAppender.
> >> >
> >> >The problems my version resolves:
> >> >
> >> >1. DailyRollingFileAppender will not rollover the log file if the
> >> >application isn't running at the time of the rollover.
> >> >
> >> >(Actually, a fix to this has already been posted. I've just
> >> >incorporated it in my version.)
> >> 
> >> Good.
> >> 
> >> >2. DailyRollingFileAppender does not use the date/time stamp in
> the
> >> >file name for the currently active logging file.
> >> 
> >> Yes, this was suggested as a change. However, some users need the
> >> behavior to remain the same.
> >> 
> >> >3. DailyRollingFileAppender always appends the date/time stamp to
> >> the
> >> >filename, rather than determining if an extension exists and
> >> inserting
> >> >the date/time stamp just before the extension. This really helps
> >> when
> >> >viewing the log file in extension-oriented systems such as
> Windows.
> >> 
> >> Makes sense.
> >> 
> >> >4. DailyRollingFileAppender does not limit the maximum number of
> >> logs
> >> >that can be created. It'll create logs forever. My version does
> the
> >> >same thing, but you can optionally set a limit. (You can't limit
> the
> >> >size, only the number.)
> >> 
> >> Seems reasonable.
> >> 
> >> >5. DailyRollingFileAppender doesn't work well with layouts such
> as
> >> >HTMLLayout. Everytime you start a logging session a header is
> sent
> >> to
> >> >the log. That makes an HTML file a mess. My version allows you to
> >> >specify how to handle the header when appending to an
> >> already-existing
> >> >log.
> >> 
> >> Good point.
> >> 
> >> >Is DailyRollingFileAppender ready for production? Sure, just pay
> >> >attention to the caveats. If you're interested in my version,
> give
> >> me a
> >> >couple of days to clean it up and get it posted. In the meantime,
> >> just
> >> >use DailyRollingFileAppender.
> >> 
> >> Please post it when you are done. Ceki
> >> 
> >> --
> >> Ceki G�lc� - http://qos.ch
> >> 
> >> 
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail:
> log4j-user-help@jakarta.apache.org
> >> 
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Send instant messages & get email alerts with Yahoo! Messenger.
> >http://im.yahoo.com/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> --
> Ceki G�lc� - http://qos.ch
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Re: daily log file question (code submission)

Posted by Ceki Gülcü <cg...@qos.ch>.
Don,

Well done!

I would have preferred to see the original author names be retained but that is is easy enough to remedy. Thanks for your contribution. Ceki

At 19:20 12.08.2001 -0700, Don Taylor wrote:
>Attached is a jar file containing
>org.apache.log4j.DailyRollingFileAppenderExt addressing the five points
>I mentioned below. The source and javadoc is also in the jar. To use,
>you can simply mount the jar.
>
>I want to work on a version that would make point 2 optional, i.e. to
>allow functionality like DailyRollingFileAppender.
>
>Enjoy.
>
>-- Don
>
>--- Ceki Gülcü <cg...@qos.ch> wrote:
>> At 09:31 08.08.2001 -0700, Don Taylor wrote:
>> >--- Aron Kramlik <ar...@itouch.com.au> wrote:
>> >> Hi,
>> >> 
>> >> I would like to ask if the DailyRollingFileAppender is the class
>> that
>> >> is
>> >> meant to be used for log files that need to be rolled every day.
>> >
>> >It is.
>> >
>> >> I have seen some discussion in the archives and I am not sure it
>> >> is production ready from the discussions - could you please advise
>> >> if this is considered ready to be used in production?  Also, a
>> simple
>> >> example, or pointer to an example, of how one can go about using
>> it.
>> >> 
>> >> Thanks,
>> >> 
>> >> Aron Kramlik
>> >> aron.kramlik@itouch.com.au
>> >> 
>> >
>> >Most of the discussion involves it not working the way you really
>> want.
>> >I have a version that's in production that does what most people
>> want,
>> >but it's only been in production a couple of weeks. I'm planning on
>> >posting it to the group this weekend, after it's cleaned-up some
>> >(getting it up to the coding standards, placing it in the right
>> >package, and so on.) In the meantime, go ahead and use the existing
>> >DailyRollingFileAppender.
>> >
>> >The problems my version resolves:
>> >
>> >1. DailyRollingFileAppender will not rollover the log file if the
>> >application isn't running at the time of the rollover.
>> >
>> >(Actually, a fix to this has already been posted. I've just
>> >incorporated it in my version.)
>> 
>> Good.
>> 
>> >2. DailyRollingFileAppender does not use the date/time stamp in the
>> >file name for the currently active logging file.
>> 
>> Yes, this was suggested as a change. However, some users need the
>> behavior to remain the same.
>> 
>> >3. DailyRollingFileAppender always appends the date/time stamp to
>> the
>> >filename, rather than determining if an extension exists and
>> inserting
>> >the date/time stamp just before the extension. This really helps
>> when
>> >viewing the log file in extension-oriented systems such as Windows.
>> 
>> Makes sense.
>> 
>> >4. DailyRollingFileAppender does not limit the maximum number of
>> logs
>> >that can be created. It'll create logs forever. My version does the
>> >same thing, but you can optionally set a limit. (You can't limit the
>> >size, only the number.)
>> 
>> Seems reasonable.
>> 
>> >5. DailyRollingFileAppender doesn't work well with layouts such as
>> >HTMLLayout. Everytime you start a logging session a header is sent
>> to
>> >the log. That makes an HTML file a mess. My version allows you to
>> >specify how to handle the header when appending to an
>> already-existing
>> >log.
>> 
>> Good point.
>> 
>> >Is DailyRollingFileAppender ready for production? Sure, just pay
>> >attention to the caveats. If you're interested in my version, give
>> me a
>> >couple of days to clean it up and get it posted. In the meantime,
>> just
>> >use DailyRollingFileAppender.
>> 
>> Please post it when you are done. Ceki
>> 
>> --
>> Ceki Gülcü - http://qos.ch
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>> 
>
>
>__________________________________________________
>Do You Yahoo!?
>Send instant messages & get email alerts with Yahoo! Messenger.
>http://im.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü - http://qos.ch


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