Solved

Tomcat: how to force all the logs to go in one file

Posted on 2006-11-02
5
217 Views
Last Modified: 2010-03-04
A default installation of Tomcat logs things in admin.{date}.log, catalina.{date}.log, host-manager.{date}.log, manager.{date}.log, and localhost.{date}.log. How to change the configuration (I guess logs/logging.properties) to send everything in one file (say logs/tomcat.log), and always the same file (without the date in the file name)?

Alex
0
Comment
Question by:avernet
  • 2
5 Comments
 
LVL 16

Expert Comment

by:manav_mathur
ID: 17862488
Does this help??
http://tomcat.apache.org/tomcat-5.5-doc/logging.html

Scroll down some more for logs/logging.propertiers sample. You have to change all the prefixes to "tomcat"
0
 
LVL 1

Accepted Solution

by:
hubtech earned 100 total points
ID: 17862490
Sorry - that's the way it works - at least until version 5.5 anyway.

From http://tomcat.apache.org/tomcat-5.0-doc/config/logger.html

File Logger (org.apache.catalina.logger.FileLogger)
The File Logger records all logged messages to disk file(s) in a specified directory. The actual filenames of the log files are created from a configured prefix, the current date in YYYY-MM-DD format, and a configured suffix. On the first logged message after midnight each day, the current log file will be closed and a new file opened for the new date, without having to shut down Catalina in order to perform this switch.

... hubtech
0
 
LVL 1

Expert Comment

by:hubtech
ID: 17862695
You can combine them into one common file by changing the prefix but you cannot do away with the date stamping.
0
 
LVL 1

Author Comment

by:avernet
ID: 18401197
All,

Thank you for the answers to this question.

Alex
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now