我有一台安装了Apache Tomcat 7.0的RHEL7服务器,并且在最近更新到RHEL7.1之后,所有到$ {catalina.base} /logs/catalina.out的日志记录都停止了。但是,我在journalctl中收到日志。
如果我输入journalctl -u tomcat,则会得到日志记录。我有什么办法可以将日志记录也发送到catalina.out吗?
cat /usr/share/tomcat/logs/catalina.out
no output
journalctl -u tomcat
Aug 20 10:07:14 server.example.com server[26435]: at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
Aug 20 10:07:14 server.example.com server[26435]: at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
Aug 20 10:07:14 server.example.com server[26435]: at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
Aug 20 10:07:14 server.example.com server[26435]: at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
Aug 20 10:07:14 server.example.com server[26435]: at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
Aug 20 10:07:14 server.example.com server[26435]: at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
Aug 20 10:07:14 server.example.com server[26435]: at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
...
jinfo -sysprops 26435 | grep catalina.base catalina.base = /usr/share/tomcat
stat /usr/share/tomcat/logs/catalina.out
stat /usr/share/tomcat/logs/catalina.out File: ‘/usr/share/tomcat/logs/catalina.out’ Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: fd01h/64769d Inode: 1013845 Links: 1 Access: (0660/-rw-rw----) Uid: ( 91/ tomcat) Gid: ( 91/ tomcat) Access: 2015-08-19 11:21:32.835211998 +0000 Modify: 2015-08-17 03:40:02.785809293 +0000 Change: 2015-08-17 03:40:02.785809293 +0000 Birth: -