Reputation: 30078
I need to pass -Dlog4j.debug to tomcat through command line, how to do that ?? The platform in Linux box, the command is $CATALINA_HOME/bin/startup.sh
I've tried set CATALINA_OPTS=-Dlog4j.debug=true but noway !!
The solution is :
export CATALINA_OPTS=-Dlog4j.debug=true
Upvotes: 2
Views: 2193
Reputation: 68
For permanent solution you can set it in $CATALINA_HOME/bin/setenv.sh
#!/bin/bash
CATALINA_OPTS="-Dlog4j.debug=true"
then run tomcat from any command-line $CATALINA_HOME/bin/startup.sh
Upvotes: 1
Reputation: 21730
I'm not sure how you're starting tomcat, but doing:
set CATALINA_OPTS=-Dlog4j.debug=true
And then starting it on the same command line, will do the job.
Hope this helps you
Upvotes: 2