Take a look at LoggerAppenderDailyFile

Source code:
https://git-wip-us.apache.org/repos/asf?p=logging-log4php.git;a=blob;f=src/main/php/appenders/LoggerAppenderDailyFile.php;h=8dce01557213002b14412f8434c935fa4315a39a;hb=ae4116e491d46170378c39c8c861a0153a957f5b
Documentation:
http://logging.apache.org/log4php/docs/appenders/daily-file.html

I guess this appender can do what you require.





On Tue, Oct 8, 2013 at 11:49 AM, Sireesh Naidu Beemineni <
[email protected]> wrote:

> Thanks Gorej. But my requirement is log has to create like ..
> Debug.Mon.00,Debug.Mon.01,Debug.Mon.02................Debug.Mon.23
> Debug.Tue.00,Debug.Tue.01,Debug.Tue.02................Debug.Tue.23
> ----------
> ----------
> Debug.Sun.00,Debug.Sun.01............Debug.Sun.23
>
> Again next week starting Debug.Mon.00 has to be deleted and new
> Debug.Mon.00 has to create for that day log.
> Can any one please suggest me solution to achieve this.
>
> Thanks & Regards,
> Sireesh.
>
>
> On Tue, Oct 8, 2013 at 3:12 PM, Vladimír Gorej <[email protected]>wrote:
>
>> LoggerAppenderRollingFile doesn't have param named datePattern. I
>> couldn't find it in the source source anywhere. Archived rolled-over files
>> are named like this: file.log.1, file.log.2, if they are compressed, then
>> file.log.1.gz, file.log.2.gz. That's it I guess.
>>
>>
>> On Tue, Oct 8, 2013 at 7:36 AM, Sireesh Naidu Beemineni <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>>      Please help me to resolve the issue.
>>>
>>> Thanks & Regards,
>>> Sireesh.
>>>
>>>
>>> On Mon, Oct 7, 2013 at 4:34 PM, Sireesh Naidu Beemineni <
>>> [email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>>       Can any one please help me to use datePattern
>>>> in LoggerAppenderRollingFile (*PHP*). Please find my sample code below.
>>>>
>>>> Sample code:-
>>>>
>>>> * <appender name="info" class="LoggerAppenderRollingFile">*
>>>> *     <param name="datePattern" value="D-H" />*
>>>> *        <param name="maxBackupIndex" value="24" />*
>>>> *     <param name="file" value="C:/temp/debug.%s.log" />*
>>>> *        <layout class="LoggerLayoutPattern">*
>>>> *         <param name="ConversionPattern" value="%d{Y-M-d H:i:s,u O}
>>>> [%p] {%c:%L:%F} - %m%n" />*
>>>> *        </layout>*
>>>> *    </appender>*
>>>>
>>>>
>>>> Thanks & Regards,
>>>> Sireesh.
>>>>
>>>
>>>
>>
>>
>> --
>>
>> Vladimír Gorej | CodeScale s.r.o.
>> email: [email protected]
>> tel: +420 777 861 279, +421 948 023 011
>> web: http://www.codescale.net
>>
>>
>


-- 

Vladimír Gorej | CodeScale s.r.o.
email: [email protected]
tel: +420 777 861 279, +421 948 023 011
web: http://www.codescale.net

Reply via email to