separated logging using startup.sh vs catalina.sh

Arbi Sookazian <[email protected]> Tue, 13 May 2025 13:47:56 -0700 (PDT)
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <[email protected]>
--=_d3899887-385b-44d7-ae57-692d0b70e47e
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi,We are unable to log to separately configured log files in Tomcat 7.x under specific startup script/condition (webapp2 is configured correctly to log to $CATALINA_BASE/logs/testing2-catalina.out):Restarted tomcat container by this command: bin/startup.shLogs from webapp2 logs (i.e testing2) are being logged to default log file (catalina.out) which is undesired.Note: Restarting tomcat container by this command: ./catalina.sh start > debugStart.out, webapp2 logs are logged correctly to testing2-catalina.out file.
$CATALINA_BASE/bin/startup.sh:PRG="$0"

while [ -h "$PRG" ] ; do
 ls=`ls -ld "$PRG"`
 link=`expr "$ls" : '.*-> \(.*\)$'`
 if expr "$link" : '/.*' > /dev/null; then
 PRG="$link"
 else
 PRG=`dirname "$PRG"`/"$link"
 fi
donePRGDIR=`dirname "$PRG"`exec "$PRGDIR"/"$EXECUTABLE" start "$@"afaik this is executing "exec bin/catalina.sh start" with no params.  Any idea why the behavior difference then in terms of logging?  Need to know because "systemctl status tomcat" shows starting as follows: ExecStart=/opt/tomcat-prod/bin/startup.sh (code=exited, status=0/SUCCESS)
and we can't change the way the service is configured.  Thanks.

Arbi Sookazian | Sr Software Engineer | Medata, Inc.
5 Peters Canyon Road, Suite 250
Irvine, CA 92606
[email protected] | www.medata.com

--=_d3899887-385b-44d7-ae57-692d0b70e47e--