Bug 1466862 - tomcat prints logging output to /var/log/messages instead of catalina.out
Summary: tomcat prints logging output to /var/log/messages instead of catalina.out
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tomcat
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Coty Sutherland
QA Contact: Jan Onderka
URL:
Whiteboard:
Depends On:
Blocks: 1477664 1557369 1557397 1654731
TreeView+ depends on / blocked
 
Reported: 2017-06-30 15:11 UTC by Lei Yu
Modified: 2020-08-13 09:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1557369 (view as bug list)
Environment:
Last Closed: 2018-12-19 15:55:25 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Lei Yu 2017-06-30 15:11:20 UTC
After moving Tomcat to systemd service units I neglected to disable the ConsoleAppender that was previously creating the catalina.out file. Now tomcat creates a catalina.log in it's log directory and directs all other output (everything by default) to the journal (and therefore /var/log/messages on rhel-7). I think that the journal output is helpful, but flooding system's /var/log/messages is less than ideal. Should we disable this by default and let users enable the journal logging when they want on rhel-7?

Step to reproduce

1) Install tomcat RPM
2) Start tomcat
3) Observe missing catalina.out and the whole tomcat log being written to /var/log/messages

Comment 2 Lei Yu 2017-06-30 15:13:28 UTC
Work around exist.

Disable the ConsoleAppender. Note that some messages will still be printed, like flags used, etc. Those are actual output of the startup script and are around 10 lines total.
--- /etc/tomcat8/logging.properties.orig	2017-06-30 10:37:50.171000000 -0400
+++ /etc/tomcat8/logging.properties	2017-06-30 10:38:07.499000000 -0400
@@ -13,9 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
+handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler
 
-.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
+.handlers = 1catalina.org.apache.juli.AsyncFileHandler
 
 ############################################################
 # Handler specific properties.


Note You need to log in before you can comment on or make changes to this bug.