-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtomcat-debug-logs.sh
executable file
·35 lines (30 loc) · 1.19 KB
/
tomcat-debug-logs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
source ~/.bashrc
export CONJUR_LOG_LINES=3
export ACCESS_LOG_LINES=10
export TOMCAT_DATED_LOG_LINES=0
export TOMCAT_SERVER_LOG_LINES=250
DATESTAMP=$(date +%Y-%m-%d)
echo
echo "CONJUR AUDIT LOG =================================="
docker exec conjur1 tail -$CONJUR_LOG_LINES /var/log/conjur/audit.json | jq .
echo
echo "LOCALHOST_ACCESS_LOG.$DATESTAMP.LOG =================================="
tail -$ACCESS_LOG_LINES $CATALINA_HOME/logs/localhost_access_log.${DATESTAMP}.txt
echo
echo "CATALINA.OUT =================================="
tail -$TOMCAT_SERVER_LOG_LINES $CATALINA_HOME/logs/catalina.out
echo
exit
# These logs do not seem to provide more/better info than those above
echo "CATALINA.$DATESTAMP.LOG =================================="
tail -$TOMCAT_DATED_LOG_LINES $CATALINA_HOME/logs/catalina.$DATESTAMP.log
echo
echo "HOST_MANAGER.$DATESTAMP.LOG =================================="
tail -10 $CATALINA_HOME/logs/host-manager.${DATESTAMP}.log
echo
echo "MANAGER.$DATESTAMP.LOG =================================="
tail -10 $CATALINA_HOME/logs/manager.${DATESTAMP}.log
echo
echo "LOCALHOST.$DATESTAMP.LOG =================================="
tail -10 $CATALINA_HOME/logs/localhost.$DATESTAMP.log