Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-11-02
5
Medium Priority
?
243 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 400 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 7 hours left to enroll

963 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