logging - Tomcat: Send Access Logs to Syslog Using Logger -
i'm trying utilize logger send events local syslog server within tomcat.
in apache can following:
logformat "%h %a %l %u %t \"%r\" %>s %p %b" events
customlog “|/usr/bin/logger -t httpd -p local6.info” events
however, trying utilize accesslogvalve in tomcat, within "pattern" interpreted string.
<valve classname="org.apache.catalina.valves.accesslogvalve" directory="logs" prefix="localhost_access_log" suffix=".txt" rotatable="false" resolvehosts="false" pattern="%h %l %u %t "%r" %s %b" />
is there anyway send access logs syslog server without using log4j or logback? need deploy configuration prod hosts. logger apache has been deployed prod. prefer utilize logger require no changes our prod applications.
short reply : no, can't moment.
for access log file, tomcat doesn't utilize logging framework, , can log file. solution extend accesslogvalve
yourself.
however there pull request which, if accepted, should allow more easily. (edit: in tomcat-trunk actually, available tomcat8 believe)
tomcat logging access-log
No comments:
Post a Comment