Solved

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

Posted on 2006-11-02
5
225 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apache SSL and mod_rewrite not working 8 223
Problem with .htaccess file 4 73
PHP in Apache server 20 105
Configure a Local PHP Interpreter for Phpstorm 2 436
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…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 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