Solved

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

Posted on 2006-11-02
5
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

695 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