Solved

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

Posted on 2006-11-02
5
221 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

778 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