This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1466862 - tomcat prints logging output to /var/log/messages instead of catalina.out
tomcat prints logging output to /var/log/messages instead of catalina.out
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tomcat (Show other bugs)
7.5-Alt
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Coty Sutherland
tomcat-qe
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-30 11:11 EDT by Lei Yu
Modified: 2017-06-30 11:13 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lei Yu 2017-06-30 11:11:20 EDT
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 11:13:28 EDT
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.