Log File size increase, Help needed, Java newbie.

M

mapnolo

Hi,

I have made a Java Application (Running on Tomcat 4.0.3 on AIX) which
writes a a log in a file (log = new PrintWriter(new
FileOutputStream("file.log")) and write the log this
way(log.println("Trace"); log.flush();), but i have a problem:

- From time to time, in order to reduce log file size , i use a script
to truncate the log file ( in Unix something like '> file.log'), but
after a while the file size is as big as it was (using 'ls -l'), so in
the end, i run out of disk space. I have tried this on HP-UX 11.0 and
on AIX 5.2, so i think it is an application problem. ¿Could you please
help me?.

- I have done the same things using C++ and it works perfectly.

Thanks in advance.
Manuel.
 
R

Ray in HK

you want to keep it or not keep it ??

<[email protected]> ¦b¶l¥ó
¤¤¼¶¼g...
Hi,

I have made a Java Application (Running on Tomcat 4.0.3 on AIX) which
writes a a log in a file (log = new PrintWriter(new
FileOutputStream("file.log")) and write the log this
way(log.println("Trace"); log.flush();), but i have a problem:

- From time to time, in order to reduce log file size , i use a script
to truncate the log file ( in Unix something like '> file.log'), but
after a while the file size is as big as it was (using 'ls -l'), so in
the end, i run out of disk space. I have tried this on HP-UX 11.0 and
on AIX 5.2, so i think it is an application problem. ¿Could you please
help me?.

- I have done the same things using C++ and it works perfectly.

Thanks in advance.
Manuel.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top