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 "Ralph Goers (JIRA)" <ji...@apache.org> on 2012/08/19 19:56:37 UTC

[jira] [Commented] (LOG4J2-44) log4j java date wise log every X MB

    [ https://issues.apache.org/jira/browse/LOG4J2-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437560#comment-13437560 ] 

Ralph Goers commented on LOG4J2-44:
-----------------------------------

Do you have an update to this record? The asynch appender and any other issues you are having should be opened as separate issues.
                
> log4j java date wise log every X MB
> -----------------------------------
>
>                 Key: LOG4J2-44
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-44
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>            Reporter: Tushar
>            Priority: Minor
>
> a log roll over that makes a new file every x MB/ KB but the current file is archived with a full date-time--random-int-to-make-  unique stamp
> so if the file is myProj_A.log after x MB is renamed to
> myProj_A_2010_09_10_02_48_02_XX34334.log (year-month-day- time ...) and so on
> Is there a pattern/ property to do this already?
> can see http://www.simonsite.org.uk/ and http://www.simonsite.org.uk/javadoc/org/apache/log4j/appender/TimeAndSizeRollingAppender.html here the code is a little mixed up (we want test and real code in seperate src roots) - and not sure if it works completely but it says it does. but it has our requirements.
> Code should write out buffer in bits instead of blocking for a long time emptying full buffer when buffer is full Or is that done by nio ?
> build and run script to test with params to control logging, number of threads, amount of data logged so we can see that the logs are rolling as planned we want the final roller to roll every day but can keep that as hour and minute params (so final will be 24 hours and 0 minutes, but for testing can be 5 minutes only, similarly size can be in KB) also need format of file name with prefix for folder so the root log folder can be c:\log then we specify the dynamic sub folder like yyyy\mm\dd meaning make sub folders for current year, inside that for month and inside that for day and finally the file name format with a prefix like myApp_{yyyy_mm_dd_HH_II_SS) and post fix so the final file will be in folder (example) C:\log\2010\10\29\myApp_2010_10_29_14_34_22_randXYZ.txt where randXYZ stand for some random text that is added to make the file name unique (as required or can use java inbuilt getTempFile function ...)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Re: [jira] [Commented] (LOG4J2-44) log4j java date wise log every X MB

Posted by Tushar Kapila <tg...@gmail.com>.
On 8/19/12, Ralph Goers (JIRA) <ji...@apache.org> wrote:
>
>     [
> https://issues.apache.org/jira/browse/LOG4J2-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437560#comment-13437560
> ]
>
> Ralph Goers commented on LOG4J2-44:
> -----------------------------------
>
> Do you have an update to this record? The asynch appender and any other
> issues you are having should be opened as separate issues.
>
>> log4j java date wise log every X MB
>> -----------------------------------
>>
>>                 Key: LOG4J2-44
>>                 URL: https://issues.apache.org/jira/browse/LOG4J2-44
>>             Project: Log4j 2
>>          Issue Type: Improvement
>>          Components: Appenders
>>            Reporter: Tushar
>>            Priority: Minor
>>
>> a log roll over that makes a new file every x MB/ KB but the current file
>> is archived with a full date-time--random-int-to-make-  unique stamp
>> so if the file is myProj_A.log after x MB is renamed to
>> myProj_A_2010_09_10_02_48_02_XX34334.log (year-month-day- time ...) and so
>> on
>> Is there a pattern/ property to do this already?
>> can see http://www.simonsite.org.uk/ and
>> http://www.simonsite.org.uk/javadoc/org/apache/log4j/appender/TimeAndSizeRollingAppender.html
>> here the code is a little mixed up (we want test and real code in seperate
>> src roots) - and not sure if it works completely but it says it does. but
>> it has our requirements.
>> Code should write out buffer in bits instead of blocking for a long time
>> emptying full buffer when buffer is full Or is that done by nio ?
>> build and run script to test with params to control logging, number of
>> threads, amount of data logged so we can see that the logs are rolling as
>> planned we want the final roller to roll every day but can keep that as
>> hour and minute params (so final will be 24 hours and 0 minutes, but for
>> testing can be 5 minutes only, similarly size can be in KB) also need
>> format of file name with prefix for folder so the root log folder can be
>> c:\log then we specify the dynamic sub folder like yyyy\mm\dd meaning make
>> sub folders for current year, inside that for month and inside that for
>> day and finally the file name format with a prefix like
>> myApp_{yyyy_mm_dd_HH_II_SS) and post fix so the final file will be in
>> folder (example) C:\log\2010\10\29\myApp_2010_10_29_14_34_22_randXYZ.txt
>> where randXYZ stand for some random text that is added to make the file
>> name unique (as required or can use java inbuilt getTempFile function
>> ...)
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

-- 
Sent from my mobile device

Regards
Tushar Kapila

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