----- Original Message ----- From: "Jacob Kjome" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[email protected]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 23, 2005 11:36 PM
Subject: Re: Log File Name !!
Could whatever starts your program rename the log filesQuoting jerome moliere <[EMAIL PROTECTED]>:
> I think RollingFileAppender does that except that it does it by size, > not by run.
> before starting?
Yes the java client itself has to rename the existing logfile before writing the new file.
I guess that you could use the RoolingFileAppender from the JBOSS group, because it delivers in standard the exact feature expected!!!
Of course, it would be nice if the JBOSS group would contribute this work back
to the Log4j project so everyone could use it from one source, but I
digress....
I don't recall all the functionality of rolling policies/triggering policies in
Log4j-1.3, but I'm sure someting like this could be accomodated. The rolling
policies are much more flexible in Log4j-1.3 than any of the specific the
RollingFileAppenders were in Log4j-1.2. Maybe Ceki can fill in the gaps here?
In any case, take a look at the 1.3 RollingFileAppender javadoc for more
details.
Jake
HTHhttp://www.amazon.fr/exec/obidos/ASIN/2212115741/qid=1105361289/sr=1-1/ref=sr_1_8_1/171-9571438-3966654
Jerome
> shirish <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I have a reqmt for a stand alone java client to output the log to a >> log
>> file.
>> This log file should be created per run of the java client.
>> The earlier log file should be renamed with an incremental integer
>>
>> for e.g
>>
>> applog.log is already existing
>> next run of the client should generate applog.log and rename the >> earlier
>> applog.log to applog1.log and so on .
>>
>> Can this be done through log4j
>>
>> Regards...
>
> --
> James Stauffer
> http://www.geocities.com/stauffer_james/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
-- Auteur cahier du programmeur J2EE - Decembre 2004
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
