For Programmers: Free Programming Magazines  


Home > Archive > Java Help > January 2006 > tomcat windows log









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author tomcat windows log
john.cockrell@gmail.com

2006-01-26, 7:05 pm

I've started at a company that uses tomcat for an internet map server.
The problem is that the file in c:\tomcat4129\logs keeps on growing and
to and above a gigabyte. To delete it i have to stop services. I have
installed software to notify me when disk space is low but i'd rather
the file didnt get this large in the first place.
I've searched google and the newsgroups, i've looked for config files
and been through the Tomcat Administration pages and the Tomcat Manager
ones and i can find information on a logger to do with catalina_log but
thats held somewhere else and has nothing to do with my problem.
Is there a way i can set the maximum size of this log file in
c:\tomcat\logs or get tomcat to change filename daily?

Rhino

2006-01-26, 7:05 pm


<john.cockrell@gmail.com> wrote in message
news:1138286194.271562.166470@g44g2000cwa.googlegroups.com...
> I've started at a company that uses tomcat for an internet map server.
> The problem is that the file in c:\tomcat4129\logs keeps on growing and
> to and above a gigabyte. To delete it i have to stop services. I have
> installed software to notify me when disk space is low but i'd rather
> the file didnt get this large in the first place.
> I've searched google and the newsgroups, i've looked for config files
> and been through the Tomcat Administration pages and the Tomcat Manager
> ones and i can find information on a logger to do with catalina_log but
> thats held somewhere else and has nothing to do with my problem.
> Is there a way i can set the maximum size of this log file in
> c:\tomcat\logs or get tomcat to change filename daily?
>

I think there is probably a way to do what you want, depending on which
version of Tomcat you have, but I'm not sure how.

There are some places to check that I don't see in the list of places you've
tried:
- the Tomcat website, particularly the HOWTO documents. You can access these
at http://tomcat.apache.org; look for the "Documentation" section of the
index, then click on the appropriate version of Tomcat. Logging works
differently in the different versions of Tomcat so you MUST choose the
appropriate Tomcat version first to get the right documents.
- the archive of the tomcat-users mailing list. You can access the archive
here: http://tomcat.apache.org/lists.html#tomcat-users. I recommend using
the MARC version of the archives because they are searchable.
- the tomcat-users mailing list, where you could post your question if it's
never been asked and answered before (which would surprise me). You can
subscribe here: http://tomcat.apache.org/lists.html#tomcat-users

Don't worry, I think you'll find an answer fairly quickly if you go to the
right places.

Rhino


SMC

2006-01-26, 7:06 pm

On Fri, 27 Jan 2006 01:36:34 +1100, john.cockrell wrote:

> I've started at a company that uses tomcat for an internet map server.
> The problem is that the file in c:\tomcat4129\logs keeps on growing and
> to and above a gigabyte. To delete it i have to stop services. I have
> installed software to notify me when disk space is low but i'd rather
> the file didnt get this large in the first place. I've searched google
> and the newsgroups, i've looked for config files and been through the
> Tomcat Administration pages and the Tomcat Manager ones and i can find
> information on a logger to do with catalina_log but thats held somewhere
> else and has nothing to do with my problem. Is there a way i can set the
> maximum size of this log file in c:\tomcat\logs or get tomcat to change
> filename daily?


In *nix land we have logrotate :-)

I believe there is a version on Windows 2000/NT. Google around for
logrotate and windows perhaps.

In the version of Tomcat you're using there's no configuration item to
handle this for you. You could drop the verbosity of the logs, see:

http://tomcat.apache.org/tomcat-4.1...fig/logger.html

If you don't want/need the logs, you can just switch
them off by excluding them from your server.xml file.

Later versions of Tomcat can use log4j which gives you size capping
options.

--
Sean

There's no place like 127.0.0.1
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com