> hello,
> i'm [sic] a software developer and i've [sic] got a problem with log4j log file.
> i'd like to ask if there is an option in configuration file that
> allows to create a new log file automatically each day.
> i mean the old one is move to some archive and new is create and we've
> got a daily log file
<http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileApp
ender.html>
Always check the documentation - it often has the answer you want. This took
me less than a minute to find by checking the log4j web site.

Signature
Lew
lchuchla2@o2.pl - 13 Nov 2007 14:42 GMT
> lchuch...@o2.pl wrote:
> > hello,
[quoted text clipped - 11 lines]
> --
> Lew
thx
lchuchla2@o2.pl - 14 Nov 2007 15:40 GMT
hello again,
now i've got problem with config file.
it looks like that:
<appender name="FILE"
class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="test.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/>
<param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] %C{2} - %m
%n"/>
</layout>
</appender>
and it doesnt work. it's set to do backup every minute but it doesnt.
someone knows how to use it ?
chuchel
lchuchla2@o2.pl - 15 Nov 2007 10:15 GMT
ok I've got config file and it looks quite good, but thats what i get:
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: t3artscc.log (Permission denied)
does anybady know whats wrong ?
Gordon Beaton - 15 Nov 2007 10:15 GMT
> ok I've got config file and it looks quite good, but thats what i get:
>
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: t3artscc.log (Permission denied)
>
> does anybady know whats wrong ?
It looks like the file doesn't exist, and you don't have permission to
create files in that directory.
/gordon
--