Skip to content
Permalink
Browse files

add tomcat access log to stdout logs

  • Loading branch information
pcaskey committed May 18, 2020
1 parent 4d1670f commit 57a74594e3ca6958a25daaa0c75c140762af17ac
Showing with 8 additions and 5 deletions.
  1. +2 −2 Dockerfile
  2. +3 −0 container_files/system/startup.sh
  3. +3 −3 container_files/tomcat/server.xml
@@ -6,11 +6,11 @@ FROM centos:centos7
#
##tomcat \
ENV TOMCAT_MAJOR=9 \
TOMCAT_VERSION=9.0.34 \
TOMCAT_VERSION=9.0.35 \
##shib-idp \
VERSION=4.0.0 \
##TIER \
TIERVERSION=20200422 \
TIERVERSION=20200518 \
#################### \
#### OTHER VARS #### \
#################### \
@@ -19,6 +19,9 @@ mkfifo -m 666 /tmp/logcrond
mkfifo -m 666 /tmp/logtomcat
(cat <> /tmp/logtomcat | awk -v ENV="$ENV" -v UT="$USERTOKEN" '{printf "tomcat;console;%s;%s;%s\n", ENV, UT, $0; fflush()}' 1>/tmp/logpipe) &

mkfifo -m 666 /tmp/tomcat_access_log
(cat <> /tmp/tomcat_access_log | awk -v ENV="$ENV" -v UT="$USERTOKEN" '{printf "tomcat-access;console;%s;%s;%s\n", ENV, UT, $0; fflush()}' 1>/tmp/logpipe) &

mkfifo -m 666 /tmp/logsuperd
(cat <> /tmp/logsuperd | awk -v ENV="$ENV" -v UT="$USERTOKEN" '{printf "supervisord;console;%s;%s;%s\n", ENV, UT, $0; fflush()}' 1>/tmp/logpipe) &

@@ -15,9 +15,9 @@
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="/tmp" prefix="tomcat_access_log"
rotatable="false" renameOnRotate="true" pattern="%h %l %u %t &quot;%r&quot; %s %b" />

</Host>
</Engine>

0 comments on commit 57a7459

Please sign in to comment.
You can’t perform that action at this time.