tomcat - log4j logfile

L

lchuchla2

hello,
i'm a software developer and i've 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
thanks for answers
chuchel
 
L

Lew

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/DailyRollingFileAppender.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.
 
L

lchuchla2

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/DailyRol...>

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.

thx
 
L

lchuchla2

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
 
L

lchuchla2

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 ?
 
G

Gordon Beaton

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

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top